Skip to content

Commit

Permalink
preparse flags with ParseFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
iFrostizz committed May 2, 2024
1 parent a89d179 commit 94b4b94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/programs/cmd/simulator/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func NewRootCmd() *cobra.Command {
cmd.SilenceErrors = true
cmd.SetHelpCommand(&cobra.Command{Hidden: true})

// pre-execute the command to pre-parse flags
err := cmd.Execute()
// pre-parse the command to pre-parse flags
err := cmd.ParseFlags(os.Args[1:])
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
Expand Down

0 comments on commit 94b4b94

Please sign in to comment.