File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ Use `| sudo bash` to run as root and install to `/usr/local/bin`.
7474Set ` PREFIX ` to install to ` $PREFIX/bin/ ` directory. Defaults to ` /usr/local `
7575when run as root or ` $HOME/.local ` when run as a non-root user.
7676
77+ Set ` VERSION ` to install a specific version. Defaults to the latest version.
78+
7779### Launching the CLI
7880
7981``` bash
Original file line number Diff line number Diff line change @@ -34,7 +34,17 @@ case "$(uname -m)" in
3434 * ) echo " Error: Unsupported architecture $( uname -m) " >&2 ; exit 1 ;;
3535esac
3636
37- DOWNLOAD_URL=" https://github.com/github/copilot-cli/releases/latest/download/copilot-${PLATFORM} -${ARCH} .tar.gz"
37+ # Determine download URL based on VERSION
38+ if [ -n " $VERSION " ]; then
39+ # Prefix version with 'v' if not already present
40+ case " $VERSION " in
41+ v* ) ;;
42+ * ) VERSION=" v$VERSION " ;;
43+ esac
44+ DOWNLOAD_URL=" https://github.com/github/copilot-cli/releases/download/${VERSION} /copilot-${PLATFORM} -${ARCH} .tar.gz"
45+ else
46+ DOWNLOAD_URL=" https://github.com/github/copilot-cli/releases/latest/download/copilot-${PLATFORM} -${ARCH} .tar.gz"
47+ fi
3848echo " Downloading from: $DOWNLOAD_URL "
3949
4050# Download and extract with error handling
You can’t perform that action at this time.
0 commit comments