You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/10/09 22:22:45 UTC

[13/19] git commit: CB-7634 Detect JAVA_HOME properly on Ubuntu

CB-7634 Detect JAVA_HOME properly on Ubuntu


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

Branch: refs/heads/master
Commit: d89a39fae5f0c7eba771748df1325df9df07d6a6
Parents: bfdc08a
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Sep 29 10:15:37 2014 -0400
Committer: Prabhjot Singh <pr...@amazon.com>
Committed: Mon Oct 6 18:31:00 2014 +0530

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/d89a39fa/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index d2f99af..b680098 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -101,7 +101,8 @@ module.exports.check_java = function() {
                     });
                 } else {
                     // See if we can derive it from javac's location.
-                    var maybeJavaHome = path.dirname(path.dirname(javacPath));
+                    // fs.realpathSync is require on Ubuntu, which symplinks from /usr/bin -> JDK
+                    var maybeJavaHome = path.dirname(path.dirname(fs.realpathSync(javacPath)));
                     if (fs.existsSync(path.join(maybeJavaHome, 'lib', 'tools.jar'))) {
                         process.env['JAVA_HOME'] = maybeJavaHome;
                     } else {


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