You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2015/05/18 06:53:03 UTC
[05/16] incubator-ranger git commit: RANGER-481: credential helper
script should not exit if JAVA_HOME is not defined
RANGER-481: credential helper script should not exit if JAVA_HOME is not defined
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/f72e949e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/f72e949e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/f72e949e
Branch: refs/heads/tag-policy
Commit: f72e949ebdbac471ad858f74839f5341bbe43275
Parents: 0336e2b
Author: Velmurugan Periasamy <ve...@apache.org>
Authored: Sun May 17 15:29:22 2015 -0400
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Sun May 17 15:29:22 2015 -0400
----------------------------------------------------------------------
security-admin/scripts/ranger_credential_helper.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/f72e949e/security-admin/scripts/ranger_credential_helper.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/ranger_credential_helper.py b/security-admin/scripts/ranger_credential_helper.py
index bc4dbb7..940dbf1 100644
--- a/security-admin/scripts/ranger_credential_helper.py
+++ b/security-admin/scripts/ranger_credential_helper.py
@@ -20,14 +20,12 @@ from subprocess import Popen,PIPE
from optparse import OptionParser
if os.getenv('JAVA_HOME') is None:
- print "[E] ---------- JAVA_HOME environment property not defined, aborting installation. ----------"
- sys.exit(1)
-
-JAVA_BIN=os.path.join(os.getenv('JAVA_HOME'),'bin','java')
+ print "[W] ---------- JAVA_HOME environment property not defined, using java in path. ----------"
+ JAVA_BIN='java'
+else:
+ JAVA_BIN=os.path.join(os.getenv('JAVA_HOME'),'bin','java')
print "Using Java:" + str(JAVA_BIN)
-
-
def main():
parser = OptionParser()