Skip to content

Commit aee4768

Browse files
authored
Merge pull request #6 from bigcommerce/INFRA-23530-fix-flag-handling
INFRA-23530 - Fix broken command-line flag parsing
2 parents c88169a + a623262 commit aee4768

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"net/http"
55
_ "net/http/pprof" // #nosec G108 - pprof is controlled via enable_pprof flag
6+
"os"
67
"runtime"
78
"strings"
89
"sync"
@@ -265,6 +266,7 @@ func main() {
265266
viper.BindEnv("enable_pprof")
266267
viper.SetDefault("enable_pprof", false)
267268

269+
cmd.ParseFlags(os.Args[1:])
268270
viper.BindPFlags(flags)
269271

270272
logLevel := viper.GetString("log_level")

0 commit comments

Comments
 (0)