Skip to content

fix(install.ps1): chocolatey + scoop fallback for Windows Server (closes #95) - #257

Merged
joelteply merged 1 commit into
canaryfrom
fix/install-ps1-windows-server-fallback
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/install-ps1-windows-server-fallback

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Detect Server SKU; print chocolatey + scoop install commands instead of the Microsoft-Store dead-end.

 #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.
Copilot AI review requested due to automatic review settings April 28, 2026 23:15
@joelteply
joelteply merged commit 75e7bb5 into canary Apr 28, 2026
@joelteply
joelteply deleted the fix/install-ps1-windows-server-fallback branch April 28, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-WingetAvailable to early-return when winget exists, otherwise detect Windows Server via Win32_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.

Comment thread install.ps1
Comment on lines +99 to +100
Write-Host ' After installing python, git, gh, openssh manually, re-run this script;'
Write-Host ' it will detect them and skip winget.'

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread install.ps1
Comment on lines +93 to +99
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;'

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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;'

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants