You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2014/08/25 19:47:00 UTC

spec commit: [CB-7374] Use nodejs exec to run grunt in Windows

Repository: cordova-mobile-spec
Updated Branches:
  refs/heads/master a624fd9ed -> 86b6dca95


[CB-7374] Use nodejs exec to run grunt in Windows

Windows requires the specific path and file of the program to run the
script, the nodejs binary file should be part of the command to run the
grunt task.
If not, the execution stops.

github: close #106


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/86b6dca9
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/86b6dca9
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/86b6dca9

Branch: refs/heads/master
Commit: 86b6dca959e295e3d42090046f3bbde0e82c4d7c
Parents: a624fd9
Author: Martin Gonzalez <ma...@gmail.com>
Authored: Mon Aug 25 11:37:17 2014 -0500
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Mon Aug 25 13:46:19 2014 -0400

----------------------------------------------------------------------
 createmobilespec/createmobilespec.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/86b6dca9/createmobilespec/createmobilespec.js
----------------------------------------------------------------------
diff --git a/createmobilespec/createmobilespec.js b/createmobilespec/createmobilespec.js
index e607ce5..e430ccb 100755
--- a/createmobilespec/createmobilespec.js
+++ b/createmobilespec/createmobilespec.js
@@ -375,7 +375,8 @@ function updateJS() {
             }
 
             pushd(cordova_js_git_dir);
-            var code = shelljs.exec(path.join(__dirname, "node_modules", "grunt-cli", "bin", "grunt")).code;
+            var nodeCommand = /^win/.test(process.platform) ? process.argv[0] + " " : "";
+            var code = shelljs.exec(nodeCommand + path.join(__dirname, "node_modules", "grunt-cli", "bin", "grunt")).code;
             if (code) {
                 console.log("Failed to build js.");
                 process.exit(1);