Skip to content

Commit 4469ffe

Browse files
committed
Return error on absent flag
1 parent 5b496e8 commit 4469ffe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

klog/app/cli/info.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ func (opt *Info) Run(ctx app.Context) app.Error {
1818
} else if opt.About {
1919
ctx.Print(INTRO_SUMMARY)
2020
} else {
21-
ctx.Print("Use --spec or --license\n")
21+
return app.NewErrorWithCode(
22+
app.GENERAL_ERROR,
23+
"No flag specified",
24+
"Run with `--help` for more info",
25+
nil,
26+
)
2227
}
2328
return nil
2429
}

0 commit comments

Comments
 (0)