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

[TIMOB-19281] Fixed bug where the command line args weren't being par… #230

Merged
merged 1 commit into from
Aug 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
4.1.x (Unreleased)
-------------------
* Fixed bug where the command line args weren't being parsed again after handling a branching option [TIMOB-19281]

4.0.1 (Unreleased)
-------------------
* Fixed bug with building an app that had a different Titanium SDK version than the selected SDK and abbreviated option names were being used [TIMOB-18826]
Expand Down
5 changes: 5 additions & 0 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,8 @@ Context.prototype.load = function load(logger, config, cli, callback) {
argv[name] && copyFlagsOptions.call(this, optionBranch[argv[name]]);

if (isHelpCommand || argv[name] !== undefined || !option.required) {
// we have to parse again in the event --<option> was passed in
this.parse(cli.argv.$_, [this.name]);
return next();
}

Expand Down Expand Up @@ -591,6 +593,9 @@ Context.prototype.load = function load(logger, config, cli, callback) {
// mix in the option branch's flags/options
copyFlagsOptions.call(this, optionBranch[value]);

// parse the args again now that we have a value and other options may have been added
this.parse(cli.argv.$_, [this.name]);

next();
}.bind(this));
}.bind(this));
Expand Down