Skip to content

Commit

Permalink
Creates a new flagset to avoid conflit with other libraries that use …
Browse files Browse the repository at this point in the history
…the same flag

DataDog/dd-trace-go#1153
  • Loading branch information
danimaribeiro committed Dec 12, 2022
1 parent 1d34ab0 commit d5df4c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions baker_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ func MainCLI(components Components) error {
log.SetFormatter(&log.JSONFormatter{})
log.SetOutput(os.Stderr)

// Create a new flagset to avoid conflict with other libraries
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
var (
flagHelpConfig = flag.String("help", "", "show help for a `component` (input/filter/output/upload) (use '*' to dump all)")
flagVerbose = flag.Bool("v", false, "verbose logging (debug level)")
Expand Down

0 comments on commit d5df4c5

Please sign in to comment.