fix: upgradePowershell should fall back to pwsh on PowerShell-7-only Windows hosts
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- bun, powershell, typescript
- Domain
- cli
Research direction
Read packages/opencode/src/installation/index.ts and inspect upgradePowershell plus the bash installer's Windows AVX2 probe for the existing executable-resolution pattern. Add a focused test for a pwsh-only host, then run the relevant installation tests; done means the upgrade path uses pwsh when available and falls back to powershell.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 62
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
-
Difficulty 2/5 Under an hour Newbie friendliness 72/100
AltimateAI/altimate-code#1283 ·
All issues in AltimateAI/altimate-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·