diff --git a/cmd/edit.go b/cmd/edit.go index 8cc1360..8adf56c 100644 --- a/cmd/edit.go +++ b/cmd/edit.go @@ -26,6 +26,10 @@ func editCmd() *cobra.Command { } func edit(args []string) { + if len(args) == 0 { + fmt.Fprintf(os.Stdout, "You need to specify a config file as first argument") + return + } file := findConfigFile(args[0]) if file == "" { fmt.Fprintf(os.Stdout, "The config %s doesn't exist", args[0])