Skip to content

Commit fb4acc9

Browse files
committed
Update location for java if log says target location was changed
1 parent a569216 commit fb4acc9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

browser/model/jdk-install.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class JdkInstall extends InstallableItem {
2727
}
2828

2929
getLocation() {
30-
if(this.hasOption(this.selectedOption) && !this.isSelected()) {
30+
if(this.hasOption(this.selectedOption)) {
3131
return this.option[this.selectedOption].location;
3232
}
3333
return this.installerDataSvc.jdkDir();
@@ -37,7 +37,7 @@ class JdkInstall extends InstallableItem {
3737
let versionRegex = /version\s"(\d+\.\d+\.\d+)_.*"/;
3838
let versionRegex1 = /(\d+\.\d+\.\d+).*/;
3939
let command = 'java -XshowSettings';
40-
this.addOption('install', versionRegex1.exec(this.version)[1], '', true);
40+
this.addOption('install', versionRegex1.exec(this.version)[1], this.installerDataSvc.jdkDir(), true);
4141
return Promise.resolve().then(()=>{
4242
if(Platform.OS == 'win32') {
4343
return this.findMsiInstalledJava();
@@ -142,6 +142,7 @@ class JdkInstall extends InstallableItem {
142142
if(targetDir !== this.getLocation()) {
143143
Logger.info(this.keyName + ' - OpenJDK location not detected, it is installed into ' + targetDir + ' according info in log file');
144144
this.installerDataSvc.jdkRoot = targetDir;
145+
this.option.install.location = targetDir;
145146
}
146147
installer.succeed(true);
147148
}).catch(()=>{

0 commit comments

Comments
 (0)