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
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
@ -22,9 +23,7 @@ func newAuthCommand() *cobra.Command {
|
||||
Use: "auth",
|
||||
Short: "Configure and verify Insights API authentication",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf("You must choose an appropriate command: configure, verify\n")
|
||||
os.Exit(1)
|
||||
return nil
|
||||
return errors.New("a valid sub-command is required")
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user