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

Passing true/false for --{type}-bust in command line #76

Closed
arsuceno opened this issue Apr 21, 2015 · 2 comments
Closed

Passing true/false for --{type}-bust in command line #76

arsuceno opened this issue Apr 21, 2015 · 2 comments
Assignees
Labels

Comments

@arsuceno
Copy link

I just realized that in order to set true/false in command line you have to use 0 or 1. Like this:

svg-sprite --css --css-bust=0 --css-sprite icons-sprite-css.svg svg/*.svg

If you use true/false it is treated as a string and it isn't parsed before https://github.com/jkphl/svg-sprite/blob/master/lib/svg-sprite/mode/base.js#L76 , getting always true as value ( !!'false' ).

@jkphl
Copy link
Collaborator

jkphl commented Apr 21, 2015

Hey @arsuceno,

thanks for clarifying this. Yes, I already noticed that there must have been a change in yargs regarding the way it is dealing with boolean arguments / switches. I'll investigate this as soon as I find some time.

Cheers,
Joschi

@jkphl jkphl self-assigned this Apr 21, 2015
@jkphl jkphl added the bug label Apr 21, 2015
@jkphl
Copy link
Collaborator

jkphl commented Apr 22, 2015

@arsuceno The behavior of boolean arguments should be fixed now. Please use --switch or --switch=true to enable a boolean feature. Any other value (or omitting the argument altogether) will result in the default value (mostly false). Please let me know if this still causes you troubles.

@jkphl jkphl closed this as completed Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants