cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] spec commit: Make createmobilespec fail when grunt fails.
Date Thu, 17 Apr 2014 16:13:16 GMT
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 <agrieve@chromium.org>
Authored: Thu Apr 17 12:11:37 2014 -0400
Committer: Andrew Grieve <agrieve@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');


Mime
View raw message