summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu <matthieu.cneude@gmail.com>2023-04-10 08:00:47 +0200
committerMatthieu <matthieu.cneude@gmail.com>2023-04-10 08:00:47 +0200
commite33bd8387854415c3805a9549d8b86365e34e19a (patch)
tree0b944da66daa8d9ba542ffdb91a5f5146ebb5cc4
parent2738e23bdc6adc7d879336c6b3acc96a584abc29 (diff)
Error if trying to run devdash edit without configHEADmaster
-rw-r--r--cmd/edit.go4
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])