AltimateAI / AltimateAI/altimate-code

fix: upgradePowershell should fall back to pwsh on PowerShell-7-only Windows hosts

Offen
#955 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
811
Forks
134
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
50

Beschreibung

Found during the v0.8.8 release review (Tech Lead, P2 deferred).

`upgradePowershell` in `packages/opencode/src/installation/index.ts` hardcodes the `powershell` executable (Windows PowerShell 5.1):

```
return Process.run(["powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command", `irm ${UPGRADE_INSTALL_PS_URL} | iex`], ...)
```

On Windows 11 / PowerShell-7-only hosts (or hardened images) where `powershell.exe` (5.1) is absent, `altimate upgrade` fails. The bash installer's Windows AVX2 probe already tries `powershell.exe` then `pwsh` — the upgrade path should do the same.

Fix: resolve the shell once, preferring `pwsh` then falling back to `powershell` (e.g. `Bun.which("pwsh") ?? "powershell"` or a shared helper), and pass the resolved path to `Process.run`.

Deferred from v0.8.8 because the self-upgrade path is sensitive and pwsh-only hosts are a subset; tracking for a focused follow-up with a test.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.