Skip to content

Commit aa64b50

Browse files
committed
pull out JDK location to constant
1 parent 6722437 commit aa64b50

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

installation_and_upgrade/ibex_install_utils/tasks/system_tasks.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646
EPICS_CRTL_PATH = os.path.join(EPICS_PATH, "crtl")
4747

48+
JAVA_INSTALL_BASE_PATH = os.path.join(APPS_BASE_DIR, "JDK")
4849

4950
DESKTOP_TRAINING_FOLDER_PATH = os.path.join(
5051
os.environ["userprofile"], "desktop", "Mantid+IBEX training"
@@ -96,14 +97,10 @@ def check_java_installation(self) -> None:
9697
admin_commands.add_command(
9798
f'msiexec /i "{installer}"',
9899
"ADDLOCAL=FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome "
99-
f'INSTALLDIR="c:\\Instrument\\apps\\JDK\\{version}" /quiet',
100+
f'INSTALLDIR="{os.path.join(JAVA_INSTALL_BASE_PATH, version)}" /quiet',
100101
expected_return_val=None,
101102
)
102-
log_file = admin_commands.run_all()
103-
104-
with open(log_file, "r") as logfile:
105-
for line in logfile.readlines():
106-
print("Java update output: {}".format(line.rstrip()))
103+
admin_commands.run_all()
107104

108105
self.prompt.prompt_and_raise_if_not_yes(
109106
"Make sure java installed correctly.\r\n"

0 commit comments

Comments
 (0)