Skip to content

Commit

Permalink
Merge pull request #5924 from cb1kenobi/timob-16522
Browse files Browse the repository at this point in the history
[TIMOB-16522] Added option value boolean checks in case the option was mistaken for a flag.
  • Loading branch information
skypanther committed Jul 22, 2014
2 parents 67bdabb + 5ed0879 commit 8ca8278
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ iOSBuilder.prototype.config = function config(logger, config, cli) {
},
required: true,
validate: function (device, callback) {
if (typeof device === 'boolean') {
return callback(true);
}
var dev = device.toLowerCase();
findTargetDevices(cli.argv.target, function (err, devices) {
if (cli.argv.target == 'device' && dev == 'all') {
Expand Down Expand Up @@ -438,6 +441,9 @@ iOSBuilder.prototype.config = function config(logger, config, cli) {
}));
},
validate: function (value, callback) {
if (typeof value === 'boolean') {
return callback(true);
}
if (cli.argv.target != 'device') {
return callback(null, value);
}
Expand Down Expand Up @@ -503,6 +509,9 @@ iOSBuilder.prototype.config = function config(logger, config, cli) {
}));
},
validate: function (value, callback) {
if (typeof value === 'boolean') {
return callback(true);
}
if (cli.argv.target != 'dist-appstore' && cli.argv.target != 'dist-adhoc') {
return callback(null, value);
}
Expand Down Expand Up @@ -698,6 +707,9 @@ iOSBuilder.prototype.config = function config(logger, config, cli) {
}));
},
validate: function (value, callback) {
if (typeof value === 'boolean') {
return callback(true);
}
if (cli.argv.target == 'simulator') {
return callback(null, value);
}
Expand Down

0 comments on commit 8ca8278

Please sign in to comment.