You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2015/08/08 01:24:35 UTC
[2/3] webos commit: Fixed issues with project creation and when using
with OS X
Fixed issues with project creation and when using with OS X
Project: http://git-wip-us.apache.org/repos/asf/cordova-webos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-webos/commit/e10a95d6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-webos/tree/e10a95d6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-webos/diff/e10a95d6
Branch: refs/heads/master
Commit: e10a95d61d4d76967496f9c8ec7daad3306037ce
Parents: 3840a10
Author: Suraj Pindoria <su...@yahoo.com>
Authored: Fri Aug 7 14:29:27 2015 -0700
Committer: Suraj Pindoria <su...@yahoo.com>
Committed: Fri Aug 7 14:29:27 2015 -0700
----------------------------------------------------------------------
bin/lib/check_reqs.js | 17 ++++++++---------
bin/lib/create.js | 2 +-
bin/templates/project/cordova/lib/ares-spawn.js | 3 +--
3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/e10a95d6/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index d9f745b..d3a2ef4 100755
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -20,14 +20,13 @@ under the License.
*/
var child_process = require("child_process"),
- Q = require("q"),
- ext = ((process.platform.indexOf("win")==0) ? "": ".sh");
+ Q = require("q");
// Returns a promise.
module.exports.check_ares_package = function() {
var d = Q.defer();
- child_process.exec("ares-package" + ext + " -V", function(err, stdout, stderr) {
- if (err) d.reject(new Error("ERROR : executing command \"ares-package" + ext + "\", make sure you have ares-webos-sdk installed and added to your path."));
+ child_process.exec("ares-package" + " -V", function(err, stdout, stderr) {
+ if (err) d.reject(new Error("ERROR : executing command \"ares-package" + "\", make sure you have ares-webos-sdk installed and added to your path."));
else d.resolve();
});
return d.promise;
@@ -36,8 +35,8 @@ module.exports.check_ares_package = function() {
// Returns a promise.
module.exports.check_ares_install = function() {
var d = Q.defer();
- child_process.exec("ares-install" + ext + " -V", function(err, stdout, stderr) {
- if (err) d.reject(new Error("ERROR : executing command \"ares-install" + ext + "\", make sure you have ares-webos-sdk installed and added to your path."));
+ child_process.exec("ares-install" + " -V", function(err, stdout, stderr) {
+ if (err) d.reject(new Error("ERROR : executing command \"ares-install" + "\", make sure you have ares-webos-sdk installed and added to your path."));
else d.resolve();
});
return d.promise;
@@ -46,8 +45,8 @@ module.exports.check_ares_install = function() {
// Returns a promise.
module.exports.check_ares_launch = function() {
var d = Q.defer();
- child_process.exec("ares-launch" + ext + " -V", function(err, stdout, stderr) {
- if (err) d.reject(new Error("ERROR : executing command \"ares-launch" + ext + "\", make sure you have ares-webos-sdk installed and added to your path."));
+ child_process.exec("ares-launch" + " -V", function(err, stdout, stderr) {
+ if (err) d.reject(new Error("ERROR : executing command \"ares-launch" + "\", make sure you have ares-webos-sdk installed and added to your path."));
else d.resolve();
});
return d.promise;
@@ -56,4 +55,4 @@ module.exports.check_ares_launch = function() {
// Returns a promise.
module.exports.run = function() {
return Q.all([this.check_ares_package(), this.check_ares_install(), this.check_ares_launch()]);
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/e10a95d6/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index fce4d59..c67405a 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -66,7 +66,7 @@ exports.createProject = function(project_path,project_id,project_name){
shjs.cp(path.join(ROOT, 'cordova-lib', 'cordova.js'), path.join(project_path,'www'));
//copy cordova-js-src directory
- shjs.cp('-rf', path.join(ROOT, 'cordova-js-src'), path.join('project_path', 'platform_www'));
+ shjs.cp('-rf', path.join(ROOT, 'cordova-js-src'), path.join(project_path, 'platform_www'));
//copy cordova folder
shjs.cp('-r', path.join(ROOT, 'bin', 'templates', 'project', 'cordova'), project_path);
http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/e10a95d6/bin/templates/project/cordova/lib/ares-spawn.js
----------------------------------------------------------------------
diff --git a/bin/templates/project/cordova/lib/ares-spawn.js b/bin/templates/project/cordova/lib/ares-spawn.js
index 47f6fb6..8f441a5 100755
--- a/bin/templates/project/cordova/lib/ares-spawn.js
+++ b/bin/templates/project/cordova/lib/ares-spawn.js
@@ -32,9 +32,8 @@ module.exports = function(cmd, args, stdio, opt_cwd) {
if (isWindows) {
args.unshift('/s', '/c', cmd);
cmd = 'cmd';
- } else {
- cmd += ".sh";
}
+
var child = child_process.spawn(cmd, args, {cwd: opt_cwd, stdio: stdio});
child.on('exit', function(code) {
if(code===0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org