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

[recovery] Unclosed contexts are ignored #7

Open
ljharb opened this issue Apr 29, 2024 · 0 comments
Open

[recovery] Unclosed contexts are ignored #7

ljharb opened this issue Apr 29, 2024 · 0 comments

Comments

@ljharb
Copy link
Member

ljharb commented Apr 29, 2024

https://web.archive.org/web/20201110211135/https://github.com/substack/subarg/issues/7

filed by @fiberthrone

I've realized that in cases like the one below unclosed contexts are just ignored by subarg without any error:

subarg(['abc', '[', 'cde']) // returns { _: [ 'abc' ] }

This may cause unexpected behavior.
For example, this is a usual browserify (which uses subarg) run:

browserify app.jsx -t [ babelify --presets [ react es2015 ] ]

However, the command below will just ignore everything after the -t arg, because double brackets close a context only once.

browserify app.jsx -t [ babelify --presets [ react es2015 ]]

Should subarg inform of an error in some way in such cases?

@ljharb ljharb transferred this issue from another repository May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant