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

Why treat --force differently? #410

Closed
Silex opened this issue Apr 7, 2014 · 5 comments
Closed

Why treat --force differently? #410

Silex opened this issue Apr 7, 2014 · 5 comments

Comments

@Silex
Copy link

Silex commented Apr 7, 2014

Hello,

At https://github.com/erikhuda/thor/blob/master/lib/thor/parser/option.rb#L89, you can see that the --force option doens't have its --no-force option generated.

  1. Why treat it differently?
  2. How can I achieve the same behavior? I don't want these --no-foo aliases.
@webdestroya
Copy link

I have this exact same problem, I have flags like --pretend which seems pointless to create a --no-pretend, when the "no pretend" should just be "don't put a flag"

It would be nice to have an option on the method_option block that lets you disable the anti-flag

@afeld
Copy link

afeld commented Jun 4, 2014

Duplicate of #417.

@Silex
Copy link
Author

Silex commented Jun 4, 2014

#417 only covers 2.

I think once #417 is fixed, we need to fix 1. and not treat --force differently.

@ddarbyson
Copy link

@webdestroya I agree, has this been fixed at all? I would like to only use --myoption without the inverted --no-pretend option

@rafaelfranca
Copy link
Member

Force is an internal option and you can't inverse it with a --no- option and this is why it is treaded differently. We will track #417 for disabling this feature for users options.

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

5 participants