Skip to content

install: report unsupported operating systems - #4762

Merged
devm33 merged 2 commits into
mainfrom
copilot/fix-unsupported-os
Sep 8, 2026
Merged

install: report unsupported operating systems#4762
devm33 merged 2 commits into
mainfrom
copilot/fix-unsupported-os

Conversation

@devm33

@devm33 devm33 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Why

On FreeBSD, install.sh reports Windows detected but winget not found because 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

  • Match Cygwin, MinGW, and MSYS explicitly as Windows environments.
  • Reject unknown systems with their actual uname -s value.

Fixes #3710.

Testing

  • bash -n install.sh
  • git diff --check
  • Simulated FreeBSD and OpenBSD; both return an unsupported operating system error.
  • Simulated Cygwin, MinGW, and MSYS; all still invoke winget install GitHub.Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@devm33
devm33 requested review from a team and a balanced review from Copilot September 8, 2026 01:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity install.shuname -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*, and MSYS*.
  • Treat all other uname -s values 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.

Comment thread install.sh Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@devm33
devm33 merged commit 6785561 into main Sep 8, 2026
4 checks passed
@devm33
devm33 deleted the copilot/fix-unsupported-os branch September 8, 2026 03:20
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.

The script at https://gh.io/copilot-install thinks that FreeBSD is Windows

3 participants