cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [01/15] git commit: util.isRootDir check for platforms/
Date Thu, 30 Jan 2014 23:16:50 GMT
Updated Branches:
  refs/heads/master 5d5ed3d34 -> c4cfb7835


util.isRootDir check for platforms/

platforms/ubuntu contains config.xml, so extra check is required


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

Branch: refs/heads/master
Commit: d029eafbd71e4459e7988c541a305fa707a5e30a
Parents: 4b98043
Author: Maxim Ermilov <maxim.ermilov@canonical.com>
Authored: Sun Jan 19 11:52:45 2014 +0400
Committer: Maxim Ermilov <maxim.ermilov@canonical.com>
Committed: Sun Jan 19 11:52:45 2014 +0400

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


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/d029eafb/src/util.js
----------------------------------------------------------------------
diff --git a/src/util.js b/src/util.js
index 278172a..c93c264 100644
--- a/src/util.js
+++ b/src/util.js
@@ -28,9 +28,13 @@ shell.mkdir('-p', lib_path);
 
 function isRootDir(dir) {
     if (fs.existsSync(path.join(dir, 'www'))) {
-        // For sure is.
         if (fs.existsSync(path.join(dir, 'config.xml'))) {
-            return 2;
+            // For sure is.
+            if (fs.existsSync(path.join(dir, 'platforms'))) {
+                return 2;
+            } else {
+                return 1;
+            }
         }
         // Might be (or may be under platforms/).
         if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) {


Mime
View raw message