Skip to content

Commit

Permalink
Try to exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashko Stubailo committed Aug 19, 2014
1 parent f59d03a commit 3c97f02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/ensure_android_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ command -v elephant >/dev/null 2>&1 || {
java -v
fi

exit 0;
exit 1;
}


Expand Down
11 changes: 8 additions & 3 deletions tools/commands-cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ var execFileAsyncOrThrow = function (file, args, opts) {
var execFileSyncOrThrow = function (file, args, opts) {
var execFileSync = require('./utils.js').execFileSync;
if (_.contains([localCordova, localAdb], file) &&
_.contains(project.getCordovaPlatforms(), 'android'))
ensureAndroidBundle();
_.contains(project.getCordovaPlatforms(), 'android')) {
try {
ensureAndroidBundle();
} catch (err) {
process.exit();
}
}

var process = execFileSync(file, args, opts);
if (! process.success)
Expand All @@ -60,7 +65,7 @@ var ensureAndroidBundle = function () {
var ensureScriptPath = path.join(files.getCurrentToolsDir(),
'scripts', 'ensure_android_bundle.sh');

execFileSyncOrThrow('sh', [ensureScriptPath], { pipeOutput: true });
execFileSyncOrThrow('bash', [ensureScriptPath], { pipeOutput: true });
};

var getLoadedPackages = _.once(function () {
Expand Down

0 comments on commit 3c97f02

Please sign in to comment.