File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
22
33import (
44 "errors"
5+ "fmt"
56 "io"
67 "os"
78
@@ -20,7 +21,10 @@ func NewRootCmd(out io.Writer, args []string) *cobra.Command {
2021 SilenceUsage : true ,
2122 Args : func (cmd * cobra.Command , args []string ) error {
2223 if len (args ) == 0 {
23- cmd .Help ()
24+ err := cmd .Help ()
25+ if err != nil {
26+ fmt .Println ("Unable to print help information" )
27+ }
2428 os .Exit (1 )
2529 } else if len (args ) != 2 {
2630 return errors .New ("release and status must be specified" )
@@ -30,7 +34,10 @@ func NewRootCmd(out io.Writer, args []string) *cobra.Command {
3034 RunE : runSetStatus ,
3135 }
3236 flags := cmd .PersistentFlags ()
33- flags .Parse (args )
37+ err := flags .Parse (args )
38+ if err != nil {
39+ fmt .Println ("Failed to parse arguments!" )
40+ }
3441 settings = new (EnvSettings )
3542 settings .AddFlags (flags )
3643
You can’t perform that action at this time.
0 commit comments