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

Add ability to disable class options for a command #462

Merged
merged 2 commits into from Jul 3, 2015

Conversation

b-dean
Copy link
Contributor

@b-dean b-dean commented Dec 11, 2014

This is added so the class options can be disabled for the help command. Fixes #363

specifically the help command needs to do this so it will always work, even when there are required class options on the class.
Fixes rails#363
sferik added a commit that referenced this pull request Jul 3, 2015
Add ability to disable class options for a command
@sferik sferik merged commit 7611ef2 into rails:master Jul 3, 2015
@b-dean b-dean deleted the disable-class-options branch July 6, 2015 13:30
rafaelfranca added a commit that referenced this pull request Feb 13, 2017
In Thor 0.19.2 it was added a new class method disable_class_options.
It was added to disable the check for required options in the help
command. This new method disabled the option parser for help, so it is
not possible to pass option to that command anymore.

That change introduced a regression and it is fixing the problem at the
wrong level. What we want is to disable the required check not the
option parsing.

So, we reverted the disable_class_options change and added a new method
disable_required_check! to disable the required check in the commands we
want.

Theoretically this is a breaking change but the disable_class_options
introduction was also a breaking change so it is better to revert it and
fix the problem at the correct place.

Related with #462 and #363.
rafaelfranca added a commit that referenced this pull request Feb 28, 2017
In Thor 0.19.2 it was added a new class method disable_class_options.
It was added to disable the check for required options in the help
command. This new method disabled the option parser for help, so it is
not possible to pass option to that command anymore.

That change introduced a regression and it is fixing the problem at the
wrong level. What we want is to disable the required check not the
option parsing.

So, we reverted the disable_class_options change and added a new method
disable_required_check! to disable the required check in the commands we
want.

Theoretically this is a breaking change but the disable_class_options
introduction was also a breaking change so it is better to revert it and
fix the problem at the correct place.

Related with #462 and #363.
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

Successfully merging this pull request may close these issues.

required class option makes help command less useful
2 participants