elves/elvish

Flag Commands Cause Panic When Given $nil Arguments.

Closed this issue · 2 comments

4ffy commented

What happened, and what did you expect to happen?

The various functions in the flag module cause a Go panic via nil dereference if passed a $nil value as any of their arguments. I would expect these to throw an exception, rather than panicking.

Examples:

flag:call $nil $nil
flag:parse $nil []
flag:parse-getopt $args $nil

Example Stacktrace:
log.txt

Output of "elvish -version"

0.22.0-dev.0.20241021163419-8527641024a2

Code of Conduct

4ffy commented

This issue was reported again in #1869 and fixed.

xiaq commented

Thanks for reporting! Left too many issues untriaged and still slowly going thru things...