Skip to content

Commit 96004d3

Browse files
committed
fix(cmd): guard against not enough arguments
1 parent 444a525 commit 96004d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/ksau/upload.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func init() {
1818
}
1919

2020
func uploadCmdCallback(cmd *cobra.Command, args []string) {
21-
if len(args) > 3 {
22-
fmt.Printf("%s: Cannot have more than three arguments", internal.GetFunctionName())
21+
if len(args) > 3 || len(args) < 2 {
22+
fmt.Printf("%s: invalid number of arguments: %d", internal.GetFunctionName(), len(args))
2323
return
2424
}
2525

0 commit comments

Comments
 (0)