Skip to content

Commit 717f5d7

Browse files
fix --automaxprocs flag not recognized
The automaxprocs flag was not being recognized due to incorrect initialization order. Register the flag before merging Go flags with pflag to make it available for command-line parsing. Signed-off-by: Praveen M <[email protected]>
1 parent 1a7e938 commit 717f5d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/csi-provisioner/csi-provisioner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ func main() {
142142
c := logsapi.NewLoggingConfiguration()
143143
logsapi.AddFlags(c, flag.CommandLine)
144144
logs.InitLogs()
145-
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
146145
standardflags.AddAutomaxprocs(klog.Infof)
146+
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
147147
flag.Parse()
148148
if err := logsapi.ValidateAndApply(c, fg); err != nil {
149149
klog.ErrorS(err, "LoggingConfiguration is invalid")

0 commit comments

Comments
 (0)