Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

halt-at-non-option is incompatible with unknown-options-as-args #437

Closed
kherock opened this issue Mar 26, 2022 · 0 comments · Fixed by #438
Closed

halt-at-non-option is incompatible with unknown-options-as-args #437

kherock opened this issue Mar 26, 2022 · 0 comments · Fixed by #438
Labels

Comments

@kherock
Copy link
Contributor

kherock commented Mar 26, 2022

Enabling unknown-options-as-args seems to short-circuit the code that would set notFlags to the remaining arguments after checking if halt-at-non-option is enabled:

if (arg !== '--' && isUnknownOptionAsArg(arg)) {
pushPositional(arg)

I see several instances where isUnknownOptionAsArg is guarded with a basic check for /^-/.test(arg). Would it be naive to suggest that updating the condition to arg !== '--' && /^-/.test(arg) && isUnknownOptionAsArg(arg) should fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants