My urfave/cli version is
v3.6.0
Checklist
Describe the bug
An empty arg and all subsequent arguments get dropped.
i.e. if I have a command line like the following, "" and everything following are dropped
$ command subcommand -f=something "" arg2 arg3
gets treated as
$ command subcommand -f=something
To reproduce
Any c.Run(ctx, []string{"command", "", "arg2"}) or similar will reproduce.
Observed behavior
commands with an empty argument misbehave or fail entirely.
Expected behavior
I would expect the arguments to include the empty argument and all following arguments.
Want to fix this yourself?
sure
Run go version and paste its output here
$ go version
go version go1.24.8 linux/amd64
Run go env and paste its output here
$ go env
AR='ar'
CC='x86_64-linux-gnu-gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='x86_64-linux-gnu-g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE=<redacted>
GOCACHEPROG=''
GODEBUG=''
GOENV=<redacted>
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=<redacted>/tmp/go-build569096055=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE=<redacted>
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH=<redacted>
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go-1.24'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR=<redacted>
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go-1.24/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.24.8'
GOWORK=''
PKG_CONFIG='pkg-config'
My urfave/cli version is
v3.6.0
Checklist
Describe the bug
An empty arg and all subsequent arguments get dropped.
i.e. if I have a command line like the following,
""and everything following are droppedgets treated as
To reproduce
Any
c.Run(ctx, []string{"command", "", "arg2"})or similar will reproduce.Observed behavior
commands with an empty argument misbehave or fail entirely.
Expected behavior
I would expect the arguments to include the empty argument and all following arguments.
Want to fix this yourself?
sure
Run
go versionand paste its output hereRun
go envand paste its output here