Skip to content
This repository was archived by the owner on Dec 9, 2023. It is now read-only.

Commit e33bd83

Browse files
committed
Error if trying to run devdash edit without config
1 parent 2738e23 commit e33bd83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/edit.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ func editCmd() *cobra.Command {
2626
}
2727

2828
func edit(args []string) {
29+
if len(args) == 0 {
30+
fmt.Fprintf(os.Stdout, "You need to specify a config file as first argument")
31+
return
32+
}
2933
file := findConfigFile(args[0])
3034
if file == "" {
3135
fmt.Fprintf(os.Stdout, "The config %s doesn't exist", args[0])

0 commit comments

Comments
 (0)