diff --git a/pygeoweaver/utils.py b/pygeoweaver/utils.py index 975ddf6..4b864d6 100644 --- a/pygeoweaver/utils.py +++ b/pygeoweaver/utils.py @@ -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