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

Only evaluate 'needs' constraints of an option if that option is actually used. #101

Merged
merged 1 commit into from
Jul 10, 2019

Conversation

inquam
Copy link
Contributor

@inquam inquam commented Jul 3, 2019

From the way I understood 'needs' it would create constraints that would make sure needed options that another option rely on are set. But the check seems to happen even if you haven't used the option that 'needs' the other options.

I, for instance, created an option to take an SMTP server host name.
Then I added options to supply username and password for that server if that was needed for the server. Using those options would 'need' the server address to be present.

But even if I didn't set the SMTP server or any of the username and password options it still complained about the need constraint. This made very little sense.

So I added a small check so it only evaluates 'needs' constraints of an option if that option is actually used.

Only check for 'needs' constraints of an option if that option is actually used
@inquam inquam changed the title Update Command.php Only evaluate 'needs' constraints of an option if that option is actually used. Jul 3, 2019
@nategood nategood merged commit 0bfb6e3 into nategood:dev Jul 10, 2019
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.

None yet

2 participants