Skip to content

Commit

Permalink
[TIMOB-11869] Fixed bug where default platform option handling was in…
Browse files Browse the repository at this point in the history
… the wrong else block.
  • Loading branch information
cb1kenobi committed Aug 2, 2013
1 parent 2d80a02 commit 6c59cd7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,9 @@ Context.prototype.load = function load(logger, config, cli, callback) {
finish();
});
return;
}

// no platform specified
} else {
if (conf.platforms && cli.sdk && cli.sdk.path) {
// load all platforms and set their options and flags
} else if (conf.platforms && cli.sdk && cli.sdk.path) {
// no platform specified, load all platforms and set their options and flags
Object.keys(conf.platforms).forEach(function (platform) {
this.platforms[platform] = new Context({
title: conf.platforms[platform].title || platform,
Expand All @@ -490,6 +487,9 @@ Context.prototype.load = function load(logger, config, cli, callback) {
}, this);
}

} else {
// no platform option

// check if this command has any subcommands, if so, parse the args again
if (Object.keys(this.subcommands).length) {
var subcmd = argv._.length && argv._[0] || conf.defaultSubcommand,
Expand Down

0 comments on commit 6c59cd7

Please sign in to comment.