This commit is contained in:
2026-01-11 09:02:21 +01:00
parent bdd3e30f14
commit ab95d124bc
5 changed files with 1460 additions and 3 deletions

View File

@@ -37,9 +37,9 @@ if (localBin) {
cmd = localBin;
args = [exePath, '--set-icon', iconPath];
} else {
// Fallback to npx. Note: Node can't execute PowerShell shims (npx.ps1), so this may fail
// in environments that only provide .ps1 launchers.
cmd = 'npx';
// Fallback to npx. Use the platform-specific shim on Windows so Node spawn finds it.
// PowerShell-only shims like npx.ps1 won't work with Node spawn; prefer npx.cmd.
cmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
args = ['rcedit', exePath, '--set-icon', iconPath];
}