Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The validation of -- options passed on the command line depends on yargs module. Update it to latest versions as the previously used one didn't set correct values of options marked as strings.
Also in our code we pass object of valid options to yargs. Options which have
-
in the name are treated in a special manner in yargs. However instead of passing them with-
, we pass their secondary representation (remove the-
and capitalize the next letter).This way, when the user passes option with
-
, yargs treat it with it's default behavior and does not respect our options for it (as we have not defined that we have option with-
).Example:
When called with:
The result is:
As you can see, passing "profileDir" and defining it as string does not work. But when we use "profile-dir" in our opts, everything works as expected and yargs sets the value to empty string.
In order to resolve the problem, make sure we pass options with dashes to yargs.
When boolean value is passed to isNullOrWhitespace helper method, it fails as true.replace is not available function.
Add unit tests for:
Changes in mobile-cli-lib are here: telerik/mobile-cli-lib#819
Fixes #2094