mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-04-25 17:25:17 +02:00
GP-6580: Suppressing "java -version" output
This commit is contained in:
@@ -319,7 +319,7 @@ class PyGhidraLauncher:
|
||||
# NOTE: shutils.which() is not enough...macOS puts a stub java on the PATH which
|
||||
# will prevent that from working as expected, so you have to actually run it.
|
||||
java_cmd = 'java'
|
||||
if not shutil.which(java_cmd) or subprocess.run([java_cmd, "-version"]).returncode != 0:
|
||||
if not shutil.which(java_cmd) or subprocess.run([java_cmd, "-version"], stderr=subprocess.DEVNULL).returncode != 0:
|
||||
java_home_dir = os.environ.get('JAVA_HOME')
|
||||
if java_home_dir and os.path.isdir(java_home_dir):
|
||||
java_cmd = java_home_dir + "/bin/java"
|
||||
|
||||
Reference in New Issue
Block a user