install: report unsupported operating systems - #4762
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new unsupported-OS error path re-runs uname -s despite set -e, which can cause an early exit before printing the intended error and is avoidable by caching the initial uname result.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
install.sh — uname -s is executed twice: once to select the platform and again in the unsupported-OS error… |
What changed in this PR
This PR updates the install.sh platform detection logic so that non-macOS/Linux systems no longer default to the Windows install path, and instead report the actual uname -s value as unsupported.
Changes:
- Detect Windows-like environments explicitly via
CYGWIN*,MINGW*, andMSYS*. - Treat all other
uname -svalues as unsupported and exit with an error message that includes the OS string.
| File | Description |
|---|---|
| install.sh | Refines OS detection to avoid misclassifying BSDs as Windows and reports unsupported platforms explicitly. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
stephentoub
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
On FreeBSD,
install.shreportsWindows detected but winget not foundbecause every operating system other than macOS and Linux falls into the Windows branch. Copilot CLI does not publish a FreeBSD binary, so the installer should report the platform as unsupported.What changed
uname -svalue.Fixes #3710.
Testing
bash -n install.shgit diff --checkwinget install GitHub.Copilot.