Skip to content

Commit

Permalink
print usage on empty argument list
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Shmulevich <[email protected]>
  • Loading branch information
dmitsh authored and yuanchen8911 committed May 8, 2024
1 parent eab45e8 commit a4820e5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/knavigator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ func mainInternal() error {
klog.InitFlags(nil)
flag.Parse()

if len(taskConfigs) == 0 {
flag.Usage()
return fmt.Errorf("missing task config")
}

taskconfigs, err := config.NewFromPaths(taskConfigs)
if err != nil {
return err
Expand Down

0 comments on commit a4820e5

Please sign in to comment.