You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/04/17 18:13:16 UTC

[2/2] spec commit: Make createmobilespec fail when grunt fails.

Make createmobilespec fail when grunt fails.

shelljs.exec doesn't fail for error code 3, which is what grunt returns


Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/24f3854c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/24f3854c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/24f3854c

Branch: refs/heads/master
Commit: 24f3854c6756aa23795b513d30f339cce74956ca
Parents: 4c17204
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Apr 17 12:11:37 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Apr 17 12:13:08 2014 -0400

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/24f3854c/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index c1dc59d..8802e6c 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -69,7 +69,10 @@ shelljs.config.fatal = true;
 shelljs.exec('./cordova-cli/bin/cordova create mobilespec --link-to cordova-mobile-spec');
 
 shelljs.pushd('cordova-js');
-shelljs.exec('grunt');
+var code = shelljs.exec('grunt').code;
+if (code) {
+    process.exit(1);
+}
 shelljs.popd();
 
 shelljs.pushd('mobilespec');