Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Jun 5, 2023
1 parent 5645c89 commit 8b84946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygeoweaver/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def get_root_dir():
def get_java_bin_from_which():
# Check if 'which' command is available
try:
subprocess.check_output(['which', 'java'])
subprocess.check_output(['source', '~/.bashrc', '&&', 'which', 'java'])
except (subprocess.CalledProcessError, FileNotFoundError):
return None

# Run 'which java' command to get the Java binary path
try:
output = subprocess.check_output(['which', 'java'], encoding='utf-8')
output = subprocess.check_output(['source', '~/.bashrc', '&&', 'which', 'java'], encoding='utf-8')
java_bin_path = output.strip()
except subprocess.CalledProcessError:
return None
Expand Down

0 comments on commit 8b84946

Please sign in to comment.