cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kam...@apache.org
Subject cordova-lib git commit: Allow hyphen in platform name
Date Mon, 16 Mar 2015 22:27:59 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 497a199fe -> ea788e101


Allow hyphen in platform name

This is to fix the following error for amazon-fireos:

    The provided path does not seem to contain a Cordova platform:
    .../.cordova/lib/npm_cache/cordova-amazon-fireos/3.6.3/package

GitHub: close #186


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/ea788e10
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/ea788e10
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/ea788e10

Branch: refs/heads/master
Commit: ea788e10193ca71027cd967550d8d9e9f4894cd4
Parents: 497a199
Author: Cristian Vergara <cristian.vergara@bookspan.com>
Authored: Fri Mar 13 10:18:06 2015 -0400
Committer: Mark Koudritsky <kamrik@gmail.com>
Committed: Mon Mar 16 18:24:41 2015 -0400

----------------------------------------------------------------------
 cordova-lib/src/cordova/platform.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/ea788e10/cordova-lib/src/cordova/platform.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/platform.js b/cordova-lib/src/cordova/platform.js
index ee18458..d94de38 100644
--- a/cordova-lib/src/cordova/platform.js
+++ b/cordova-lib/src/cordova/platform.js
@@ -233,12 +233,8 @@ function downloadPlatform(projectRoot, platform, version, opts) {
 }
 
 function platformFromName(name) {
-    var platMatch = /^cordova-([a-z0-9]+)$/.exec(name);
-    var ret = platMatch && platMatch[1];
-    if (ret == 'amazon') {
-        ret = 'amazon-fireos';
-    }
-    return ret;
+    var platMatch = /^cordova-([a-z0-9-]+)$/.exec(name);
+    return platMatch && platMatch[1];
 }
 
 // Returns a Promise


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message