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

--no-browser-field flag not working #1286

Closed
fynyky opened this issue May 27, 2015 · 3 comments · Fixed by #1288
Closed

--no-browser-field flag not working #1286

fynyky opened this issue May 27, 2015 · 3 comments · Fixed by #1288

Comments

@fynyky
Copy link

fynyky commented May 27, 2015

When using the --node flag it correctly sets argv.bare to true and argv.browserField to false. However when using the --no-browser-field flag argv.browserField is undefined.

Discovered because --node was giving different behaviour than --bare and --no-browser-field

@ghost
Copy link

ghost commented May 29, 2015

It looks like internally it's using a camel cased version instead of a dashed version and the alias for 'browser-field' => 'browserField' isn't picking that up. In minimist/subarg this all should work:

> require('minimist')(['--no-browser-field'], { alias: { bf: [ 'browser-field', 'browserField' ] } })
{ _: [], 'browser-field': false, bf: false, browserField: false }
> require('minimist')(['--no-bf'], { alias: { bf: [ 'browser-field', 'browserField' ] } })
{ _: [], bf: false, 'browser-field': false, browserField: false }

@ghost
Copy link

ghost commented May 29, 2015

Update: found it! There's a space in 'browserField ' in bin/args.js

@ghost
Copy link

ghost commented May 29, 2015

Fixed now in 10.2.3.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant