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/03/31 22:14:53 UTC
[1/2] git commit: CB-6377 Handle spaces in paths for cmd related
scripts
Repository: cordova-cli
Updated Branches:
refs/heads/master 640c98ed5 -> 289239daa
CB-6377 Handle spaces in paths for cmd related scripts
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/6ddd9596
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/6ddd9596
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/6ddd9596
Branch: refs/heads/master
Commit: 6ddd95968fc100c510aaf08eba22472bcf175ea2
Parents: 640c98e
Author: Josh Soref <js...@blackberry.com>
Authored: Mon Mar 31 13:39:54 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 31 14:53:36 2014 -0400
----------------------------------------------------------------------
src/superspawn.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/6ddd9596/src/superspawn.js
----------------------------------------------------------------------
diff --git a/src/superspawn.js b/src/superspawn.js
index 6c42a7c..12e63f4 100644
--- a/src/superspawn.js
+++ b/src/superspawn.js
@@ -60,11 +60,11 @@ exports.spawn = function(cmd, args, opts) {
var spawnOpts = {};
var d = Q.defer();
- if (process.platform.slice(0, 3) == 'win') {
+ if (process.platform == 'win32') {
cmd = resolveWindowsExe(cmd);
// If we couldn't find the file, likely we'll end up failing,
// but for things like "del", cmd will do the trick.
- if (!fs.existsSync(cmd)) {
+ if (path.extname(cmd) !== 'exe' || !fs.existsSync(cmd)) {
args = [['/s', '/c', '"'+[cmd].concat(args).map(function(a){if (/^[^"].* .*[^"]/.test(a)) return '"'+a+'"'; return a;}).join(" ")+'"'].join(" ")];
cmd = 'cmd';
}
[2/2] git commit: CB-6382 platform list: sort output
Posted by ag...@apache.org.
CB-6382 platform list: sort output
github: close #156
Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/289239da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/289239da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/289239da
Branch: refs/heads/master
Commit: 289239daa806e38f47aa68f6ce5f5c4882f89a78
Parents: 6ddd959
Author: Josh Soref <js...@blackberry.com>
Authored: Mon Mar 31 15:19:28 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 31 16:14:36 2014 -0400
----------------------------------------------------------------------
spec/platform.spec.js | 2 +-
src/platform.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/289239da/spec/platform.spec.js
----------------------------------------------------------------------
diff --git a/spec/platform.spec.js b/spec/platform.spec.js
index 65a22b7..d4ad000 100644
--- a/spec/platform.spec.js
+++ b/spec/platform.spec.js
@@ -165,7 +165,7 @@ describe('platform command', function() {
});
it('should list out added platforms in a project', function(done) {
cordova.on('results', function(res) {
- expect(res).toMatch(/^Installed platforms: ios, android, ubuntu, amazon-fireos, wp7, wp8, blackberry10, firefoxos, windows8\s*Available platforms:\s*$/);
+ expect(res).toMatch(RegExp("^Installed platforms: "+supported_platforms.sort().join(", ")+"\\s*Available platforms:\\s*$"));
done();
});
cordova.raw.platform('list');
http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/289239da/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index b932df9..1f21f22 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -221,7 +221,7 @@ function list(hooks, projectRoot) {
});
}));
}).then(function(platformsText) {
- var results = 'Installed platforms: ' + platformsText.join(', ') + '\n';
+ var results = 'Installed platforms: ' + platformsText.sort().join(', ') + '\n';
var available = Object.getOwnPropertyNames(platforms).filter(function(p) {
var platform = platforms[p] || {},
hostos = platform.hostos || null;