Repository navigation
fix(install.ps1): chocolatey + scoop fallback for Windows Server (closes #95) - #257
Conversation
#95) Windows Server has no Microsoft Store, so the existing 'open the Store / grab .msixbundle' fallback was a dead-end. Now Test-WingetAvailable detects ProductType=2 (DC) or 3 (Server) and surfaces chocolatey + scoop install commands instead. Install-IfMissing already short-circuits when the test predicate finds the dep already installed (so chocolatey/scoop pre-installs are detected and winget is skipped). Verification: PowerShell syntax ok; Windows Server path requires a real Server box to e2e — continuum-b69f or another Win-Server-equipped tester can verify via #244 if/when one's available.
There was a problem hiding this comment.
Pull request overview
Updates the Windows-native installer (install.ps1) to handle environments where winget is unavailable by detecting Windows Server SKUs and presenting alternate bootstrap instructions (Chocolatey / Scoop) instead of only the Microsoft Store path.
Changes:
- Change
Test-WingetAvailableto early-return whenwingetexists, otherwise detect Windows Server viaWin32_OperatingSystem.ProductType. - On Windows Server, print Chocolatey/Scoop install command guidance instead of Microsoft Store guidance.
- Slightly adjust the non-Server fallback wording (“If the Store is unavailable …”).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Write-Host ' After installing python, git, gh, openssh manually, re-run this script;' | ||
| Write-Host ' it will detect them and skip winget.' |
There was a problem hiding this comment.
The message in the Server fallback says “re-run this script; it will detect them and skip winget”, but the script calls Test-WingetAvailable unconditionally at startup and exits if winget is missing. As written, a Server user who installs these tools manually will still hit the same failure on rerun. Either implement a winget-less path (only require winget when some prereq is missing), or adjust the instructions to state that winget itself must be installed/sideloaded before rerunning.
| Write-Host ' choco install -y python git gh openssh' | ||
| Write-Host '' | ||
| Write-Host ' # OR scoop (user-scope, no admin needed):' | ||
| Write-Host " iwr -useb https://get.scoop.sh | iex" | ||
| Write-Host ' scoop install python git gh openssh' | ||
| Write-Host '' | ||
| Write-Host ' After installing python, git, gh, openssh manually, re-run this script;' |
There was a problem hiding this comment.
The Server fallback install list omits prerequisites that this installer later requires (e.g., PowerShell 7+ for the airc.cmd shim, and possibly others like jq). If the intent is to let Windows Server users bootstrap via chocolatey/scoop, update these printed commands (and the “After installing …” line) to cover the full prereq set that install.ps1 expects, or explicitly mark which ones are optional.
| Write-Host ' choco install -y python git gh openssh' | |
| Write-Host '' | |
| Write-Host ' # OR scoop (user-scope, no admin needed):' | |
| Write-Host " iwr -useb https://get.scoop.sh | iex" | |
| Write-Host ' scoop install python git gh openssh' | |
| Write-Host '' | |
| Write-Host ' After installing python, git, gh, openssh manually, re-run this script;' | |
| Write-Host ' choco install -y python git gh openssh powershell-core jq' | |
| Write-Host '' | |
| Write-Host ' # OR scoop (user-scope, no admin needed):' | |
| Write-Host " iwr -useb https://get.scoop.sh | iex" | |
| Write-Host ' scoop install python git gh openssh pwsh jq' | |
| Write-Host '' | |
| Write-Host ' After installing python, git, gh, openssh, PowerShell 7+ (pwsh), and jq manually, re-run this script;' |
Detect Server SKU; print chocolatey + scoop install commands instead of the Microsoft-Store dead-end.