diff options
author | Matthieu <matthieu.cneude@gmail.com> | 2023-04-10 08:00:47 +0200 |
---|---|---|
committer | Matthieu <matthieu.cneude@gmail.com> | 2023-04-10 08:00:47 +0200 |
commit | e33bd8387854415c3805a9549d8b86365e34e19a (patch) | |
tree | 0b944da66daa8d9ba542ffdb91a5f5146ebb5cc4 | |
parent | 2738e23bdc6adc7d879336c6b3acc96a584abc29 (diff) |
-rw-r--r-- | cmd/edit.go | 4 |
1 files changed, 4 insertions, 0 deletions
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]) |