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

fix warnings when values set in .json file: minUptime and spinSleepTime #819

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skimj
Copy link

@skimj skimj commented Mar 8, 2016

Warnings are thrown during getOptions if minUptime and/or spinSleepTime are not set as CLI arguments. If these parameters are defined in a .json config file, the program flow first checks for the CLI argument, throws the warning and then sets the options based on the .json parameters. This is a simple fix to the if statement which also checks if these parameters are set in the .json file.

Warnings are thrown during getOptions if minUptime and/or spinSleepTime are not set as CLI arguments. If these parameters are defined in a .json config file, the program flow first checks for the CLI argument, throws  the warning and then sets the options based on the .json parameters. This is a simple fix to the if statement which also checks if these parameters are set in the .json file.
@@ -263,12 +263,12 @@ var getOptions = cli.getOptions = function (file) {
? options.watchIgnore
: [options.watchIgnore];

if (!options.minUptime) {
if (!options.minUptime && ~configs.indexOf("minUptime")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does ~ before configs mean in this context? Did you mean !?

Copy link
Contributor

@kibertoad kibertoad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review the pointed out part of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants