Open
Conversation
Re-applies the change from PR #1497 which was reverted in PR #1548. The original broke the workflow YAML because the PowerShell here-string content and closing tag had zero indentation, which terminated the YAML literal block scalar (run: |). Fixed by indenting the here-string body to match the block indentation level; YAML strips the leading spaces, leaving valid PowerShell with the closing tag at column 0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include PowerShell dependency in winget manifest (v3)
Updated installation instructions and removed npm references.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
README updates
When copilot is not on PATH after install, the script now: - Tells users to restart their shell or source their RC file after adding the PATH export - Provides a copy-pasteable one-liner (export PATH + copilot help) that fixes PATH for the current session and runs the getting started command - Only shows the simple 'copilot help' message when it will actually work Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When the GITHUB_TOKEN environment variable is set, pass it as an Authorization header on curl/wget downloads and embed it in the git remote URL for ls-remote. This helps avoid rate limits and enables installation from private repositories. When GITHUB_TOKEN is unset, behavior is unchanged — the auth arrays expand to nothing and the git remote URL stays unauthenticated. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
install: use GITHUB_TOKEN for authenticated GitHub requests
The installer was adding PATH exports to .bashrc/.zshrc, which are rc files for interactive shells. PATH belongs in login-shell startup files (~/.profile, ~/.bash_profile, ~/.zprofile) so it is set once per session and inherited by all child processes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Alter PATH for login shells, not interactive shells
Tags are sorted lexicographically by default, not by version, so for example right now `git ls-remote` for this repo shows: ``` $ git ls-remote --tags \ https://github.com/github/copilot-cli \ | tail -3 | awk -F/ '{print$NF}' v1.0.8 v1.0.8-0 v1.0.9 ``` With the sort option, it shows the correct latest prerelease tags: ``` $ git ls-remote --tags --sort "version:refname" \ https://github.com/github/copilot-cli \ | tail -3 | awk -F/ '{print$NF}' v1.0.12-0 v1.0.12-1 v1.0.12-2 ``` This option for git ls-remote was added in git version 2.18.0 in June 2018: https://github.com/git/git/blob/v2.18.0/Documentation/RelNotes/2.18.0.txt#L69-L70
Sort git tags when determining prerelease version
Fish shell users currently fall into the catch-all case, which writes POSIX export syntax to ~/.profile. Fish does not source ~/.profile and does not use export PATH="...:$PATH" syntax, so the PATH addition silently does nothing. Add a fish case that targets the idiomatic conf.d directory and uses fish_add_path, matching how the script already handles zsh and bash with their respective profile files and syntax. Extract the PATH command into a variable to avoid duplicating the shell-specific logic across the interactive prompt, non-interactive hint, and get-started instructions.
Replace scattered rm -rf calls with a single EXIT trap to ensure the temp directory is always cleaned up on exit. Previously, failures in curl/wget download, tar extraction, chmod, or mkdir left temp files behind because set -e would exit before reaching manual cleanup calls. The trap fires on any exit (success or failure), so it covers all paths with one line while removing five redundant cleanup calls.
install: use EXIT trap for temp directory cleanup
install: add fish shell support for PATH configuration
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )