Skip to content

Commit 7a55ac1

Browse files
fix: Use msiexec to install WAD (#326)
1 parent 04e0d7a commit 7a55ac1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/install-wad.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,13 @@ async function installWad(version) {
166166
log.info(`Will download and install v${release.version} from ${asset.url}`);
167167
try {
168168
await downloadToFile(asset.url, installerPath);
169-
await shellExec(installerPath, ['/install', '/quiet', '/norestart']);
169+
if (_.toLower(parsedName.ext) === EXT_MSI) {
170+
await shellExec('msiexec.exe', ['/i', installerPath, '/quiet', '/norestart']);
171+
} else if (_.toLower(parsedName.ext) === EXT_EXE) {
172+
await shellExec(installerPath, ['/install', '/quiet', '/norestart']);
173+
} else {
174+
throw new Error(`Unsupported WAD installer: ${asset.name}`);
175+
}
170176
} finally {
171177
try {
172178
await fs.unlink(installerPath);

0 commit comments

Comments
 (0)