I expect cli.Context can Lineage correctly and find flag I need.
Additional context
Want to fix this yourself?
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
Run go version and paste its output here
go version go1.16 darwin/amd64
Run go env and paste its output here
# paste `go env` output in here
The text was updated successfully, but these errors were encountered:
WUST-mengqinyu
changed the title
Empty pointer when getting context's flagSet in UsageError function.
Nil pointer when getting context's flagSet in UsageError function.
Jan 11, 2022
my urfave/cli version is
v2.3.0
Checklist
Dependency Management
Describe the bug
When I try to get flag from UsageError function, program panic because cli.Context's flagSet is a nil pointer.
To reproduce
Observed behavior
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x114b8aa]
Expected behavior
I expect cli.Context can Lineage correctly and find flag I need.
Additional context
Want to fix this yourself?
We'd love to have more contributors on this project! If the fix for this bug is easily explained and very small, free free to create a pull request for it.
Run
go versionand paste its output hereRun
go envand paste its output hereThe text was updated successfully, but these errors were encountered: