Skip to content

Commit 4e0767d

Browse files
committed
Updates: Fix MSI installer
This is to match changes to electron-updater. Signed-off-by: Mark Yen <[email protected]>
1 parent 333c64b commit 4e0767d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/rancher-desktop/main/update/MSIUpdater.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,19 @@ export default class MsiUpdater extends NsisUpdater {
8888
protected doInstall(options: InstallOptions): boolean {
8989
const systemRoot = process.env.SystemRoot ?? 'C:\\Windows';
9090
const msiexec = path.join(systemRoot, 'system32', 'msiexec.exe');
91+
const installerPath = this.installerPath;
92+
93+
if (!installerPath) {
94+
this._logger.error('doInstall() called without a installer path');
95+
this.dispatchError(new Error("No valid update available, can't quit and install"));
96+
97+
return false;
98+
}
99+
91100
const args: string[] = [
92101
'/norestart',
93102
'/lv*', path.join(paths.logs, 'msiexec.log'),
94-
'/i', options.installerPath,
103+
'/i', installerPath,
95104
];
96105
const elevate = options.isAdminRightsRequired || this.shouldElevate;
97106

0 commit comments

Comments
 (0)