IsSet for aliases of TimestampFlag doesn't work #1731
Labels
area/v2
relates to / is being considered for v2
kind/bug
describes or fixes a bug
status/triage
maintainers still need to look into this
My urfave/cli version is
github.com/urfave/cli/v2 v2.25.3
Checklist
Dependency Management
Describe the bug
When defining a
TimestampFlag
with an alias, callingctx.IsSet
on the name (not the alias) returns false when the alias is used in the command line.To reproduce
https://go.dev/play/p/WMR_blIb2kf
Observed behavior
cCtx.IsSet("meeting")
returns false for the call with-m=...
Expected behavior
cCtx.IsSet("meeting")
should return true if using the alias-m=...
Additional context
cli/flag.go
Line 199 in acbbbf2
Issue seems to be here, in
copyFlag
, when converting the value of the flag to String, can't be decoded by golang flag packageRun
go version
and paste its output hereRun
go env
and paste its output hereThe text was updated successfully, but these errors were encountered: