cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhigg...@apache.org
Subject webworks commit: Auto-detect started simulator on Linux
Date Mon, 28 Oct 2013 15:37:43 GMT
Updated Branches:
  refs/heads/master 6eaf03323 -> c6de78e2f


Auto-detect started simulator on Linux

Adding utils.isOSX() api to match utils.isWindows()


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

Branch: refs/heads/master
Commit: c6de78e2f6663cd3dc7e31c50d551a546c0a9faf
Parents: 6eaf033
Author: Josh Soref <jsoref@blackberry.com>
Authored: Tue Oct 22 04:09:07 2013 -0400
Committer: Bryan Higgins <bhiggins@blackberry.com>
Committed: Mon Oct 28 11:37:19 2013 -0400

----------------------------------------------------------------------
 blackberry10/bin/lib/utils.js                                  | 4 ++++
 blackberry10/bin/templates/project/cordova/lib/target-utils.js | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/c6de78e2/blackberry10/bin/lib/utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/lib/utils.js b/blackberry10/bin/lib/utils.js
index 8ebae25..41428d9 100644
--- a/blackberry10/bin/lib/utils.js
+++ b/blackberry10/bin/lib/utils.js
@@ -134,6 +134,10 @@ _self = {
         return os.type().toLowerCase().indexOf("windows") >= 0;
     },
 
+    isOSX: function () {
+        return os.type().toLowerCase().indexOf("darwin") >= 0;
+    },
+
     isArray: function (obj) {
         return obj.constructor.toString().indexOf("Array") !== -1;
     },

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/c6de78e2/blackberry10/bin/templates/project/cordova/lib/target-utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/bin/templates/project/cordova/lib/target-utils.js b/blackberry10/bin/templates/project/cordova/lib/target-utils.js
index 9ca6be4..11e6791 100644
--- a/blackberry10/bin/templates/project/cordova/lib/target-utils.js
+++ b/blackberry10/bin/templates/project/cordova/lib/target-utils.js
@@ -175,8 +175,10 @@ _self = {
                 return DHCP_LEASES_REGEX.test(file);
             });
             pathVmDhcpLeases = vmDhcpLeasesFiles[0];
-        } else {
+        } else if (bb10_utils.isOSX()) {
             pathVmDhcpLeases = "/private/var/db/vmware/vmnet-dhcpd-vmnet8.leases";
+        } else {
+            pathVmDhcpLeases = "/var/db/vmware/vmnet-dhcpd-vmnet8.leases";
         }
 
         fs.readFile(pathVmDhcpLeases, 'utf8', function (err, data) {


Mime
View raw message