Skip to content

install: report unsupported operating systems - #4761

Closed
1fanwang wants to merge 1 commit into
github:mainfrom
1fanwang:1fannnw/report-unsupported-platform
Closed

install: report unsupported operating systems#4761
1fanwang wants to merge 1 commit into
github:mainfrom
1fanwang:1fannnw/report-unsupported-platform

Conversation

@1fanwang

@1fanwang 1fanwang commented Sep 8, 2026

Copy link
Copy Markdown

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

The installer now treats Cygwin, MinGW, and MSYS as Windows. Other unknown systems fail with their actual uname -s value.

References

#3710

Testing

Scenario Result
FreeBSD against upstream/main Reproduced the incorrect Windows message
FreeBSD with this change Reports Unsupported operating system FreeBSD
MinGW Still invokes winget install GitHub.Copilot
macOS arm64 and Linux x64 Still select their existing release assets
Raw logs
$ tmp=$(mktemp -d)
$ printf '#!/bin/sh\ncase "$1" in -m) echo amd64;; *) echo FreeBSD;; esac\n' > "$tmp/uname"
$ chmod +x "$tmp/uname"
$ git show upstream/main:install.sh > "$tmp/before.sh"
$ PATH="$tmp:/usr/bin:/bin" bash "$tmp/before.sh"; echo "exit=$?"
Installing GitHub Copilot CLI...
Error: Windows detected but winget not found. Please see https://gh.io/install-copilot-readme
exit=1

$ PATH="$tmp:/usr/bin:/bin" bash install.sh; echo "exit=$?"
Installing GitHub Copilot CLI...
Error: Unsupported operating system FreeBSD
exit=1

bash -n install.sh and git diff --check pass.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
@1fanwang
1fanwang requested review from a team and a balanced review from Copilot September 8, 2026 01:22

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.

🟢 Approval recommended

The focused detection change correctly handles FreeBSD while preserving supported platform behavior.

Pull request overview

Updates OS detection so unsupported systems no longer fall through to Windows installation logic.

Changes:

  • Recognizes Cygwin, MinGW, and MSYS as Windows.
  • Reports unknown platforms using their uname -s value.
File summaries
File Description
install.sh Adds explicit Windows matching and unsupported-OS handling.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@1fanwang

1fanwang commented Sep 8, 2026

Copy link
Copy Markdown
Author

Superseded by #4762, which landed the same detection change. Closing.

@1fanwang 1fanwang closed this Sep 8, 2026
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