mirror of
https://github.com/safedep/vet.git
synced 2025-12-10 13:43:01 -06:00
Fix #15: Return error when auth sub-command is missing
This commit is contained in:
parent
b4c407dddc
commit
504598de65
5
auth.go
5
auth.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
@ -22,9 +23,7 @@ func newAuthCommand() *cobra.Command {
|
|||||||
Use: "auth",
|
Use: "auth",
|
||||||
Short: "Configure and verify Insights API authentication",
|
Short: "Configure and verify Insights API authentication",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
fmt.Printf("You must choose an appropriate command: configure, verify\n")
|
return errors.New("a valid sub-command is required")
|
||||||
os.Exit(1)
|
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user