Skip to content

Commit 957641a

Browse files
committed
JBDS-4024 Components installation sometimes called twice
Fix updates condition for install method to avoid the problem.
1 parent 6c038f1 commit 957641a

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

browser/model/cdk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class CDKInstall extends InstallableItem {
9494
let name = this.getInstallAfter().productName;
9595
progress.setStatus(`Waiting for ${name} to finish installation`);
9696
ipcRenderer.on('installComplete', (event, arg) => {
97-
if (!this.isInstalled() && this.getInstallAfter().isInstalled()) {
97+
if (!this.isInstalled() &&arg === this.getInstallAfter().keyName) {
9898
this.postVagrantInstall(progress, success, failure);
9999
}
100100
});

browser/model/cygwin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class CygwinInstall extends InstallableItem {
8080
let name = this.getInstallAfter().productName;
8181
progress.setStatus(`Waiting for ${name} to finish installation`);
8282
ipcRenderer.on('installComplete', (event, arg) => {
83-
if (!this.isInstalled() && this.getInstallAfter().isInstalled() ) {
83+
if (!this.isInstalled() && arg === this.getInstallAfter().keyName) {
8484
this.postVirtualboxInstall(progress, success, failure);
8585
}
8686
});
@@ -112,7 +112,6 @@ class CygwinInstall extends InstallableItem {
112112
'[Environment]::SetEnvironmentVariable("Path", "$cygwinPath;$oldPath", "User");',
113113
'[Environment]::Exit(0)'
114114
].join('\r\n');
115-
116115
let originalExecFile = path.join(this.installerDataSvc.cygwinDir(),'setup-x86_64.exe');
117116
installer.execFile(
118117
this.downloadedFile, opts

browser/model/jbds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class JbdsInstall extends InstallableItem {
137137
let name = this.getInstallAfter().productName;
138138
progress.setStatus(`Waiting for ${name} to finish installation`);
139139
ipcRenderer.on('installComplete', (event, arg) => {
140-
if(!this.isInstalled() && this.getInstallAfter().isInstalled()) {
140+
if(!this.isInstalled() && arg === this.getInstallAfter().keyName) {
141141
this.postInstall(progress, success, failure);
142142
}
143143
});

browser/model/vagrant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class VagrantInstall extends InstallableItem {
130130
let name = this.getInstallAfter().productName;
131131
progress.setStatus(`Waiting for ${name} to finish installation`);
132132
ipcRenderer.on('installComplete', (event, arg) => {
133-
if (!this.isInstalled() && this.getInstallAfter().isInstalled()) {
133+
if (!this.isInstalled() && arg === this.getInstallAfter().keyName) {
134134
this.postCygwinInstall(progress, success, failure);
135135
}
136136
});

browser/model/virtualbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class VirtualBoxInstall extends InstallableItem {
154154
let name = this.getInstallAfter().productName;
155155
progress.setStatus(`Waiting for ${name} to finish installation`);
156156
ipcRenderer.on('installComplete', (event, arg) => {
157-
if (!this.isInstalled() && this.getInstallAfter().isInstalled()) {
157+
if (!this.isInstalled() && arg === this.getInstallAfter().keyName) {
158158
this.postOpenJdk(progress, success, failure);
159159
}
160160
});

0 commit comments

Comments
 (0)