-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add native binary fallbacks for Copilot CLI installation when npm is unavailable #3651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
4
commits into
main
Choose a base branch
from
copilot/update-copilot-cli-installation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+132
−48
Conversation
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
- copilotCLIShim.ps1 (Windows): tries npm, then winget - copilotCLIShim.ts (Linux/Mac): tries npm, brew, curl, then wget Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
… vs install for npm Co-authored-by: DonJayamanne <1948812+DonJayamanne@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Copilot CLI installation for users without npm
Add native binary fallbacks for Copilot CLI installation when npm is unavailable
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds more resilient installation/update fallbacks for the Copilot CLI terminal shim scripts so bootstrap doesn’t depend solely on npm being present.
Changes:
- Linux/macOS shim: cascade installer attempts
npm → brew → curl → wget, usingcommand -vfor portable command detection. - Windows shim: splits install/update into dedicated functions and falls back from
npmtowinget. - User-facing failure guidance now points to official Copilot CLI install docs instead of npm-specific commands.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/extension/chatSessions/vscode-node/copilotCLIShim.ts | Adds multi-strategy install/update logic for macOS/Linux (brew + official install script via curl/wget). |
| src/extension/chatSessions/vscode-node/copilotCLIShim.ps1 | Adds winget fallback and separates install vs update behavior on Windows. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
DonJayamanne
approved these changes
Feb 12, 2026
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.
CLI shim scripts only used
npm installto bootstrap Copilot CLI, which fails if npm isn't installed.Windows (
copilotCLIShim.ps1)winget install GitHub.Copilot)Install-CopilotCLI/Update-CopilotCLIfunctions check for npm availability before attempting, then fall back to wingetLinux/macOS (
copilotCLIShim.ts)brew install copilot-cli, or the official install script viacurl -fsSL https://gh.io/copilot-install | bash/wget -qO-command -v(notwhich) for portable command detectionnpm updatevsnpm installfor version upgrade vs fresh install pathsError messages now link to the official docs page rather than showing npm-specific commands.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.