Skip to content

Commit 4ffb8b2

Browse files
committed
Add check for supported arch and fix remote name for amd64
1 parent a2cd1fb commit 4ffb8b2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/copilot-cli/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ install_using_github() {
4949
check_packages wget tar ca-certificates git
5050
echo "Finished setting up dependencies"
5151
arch=$(dpkg --print-architecture)
52+
if [ "${arch}" = "amd64" ]; then
53+
arch="x64"
54+
fi
55+
if [ "${arch}" != "x64" ] && [ "${arch}" != "arm64" ]; then
56+
echo "Unsupported architecture: ${arch}" >&2
57+
exit 1
58+
fi
5259
cli_filename="copilot-linux-${arch}.tar.gz"
5360
echo "Installing GitHub Copilot CLI for ${arch} architecture: ${cli_filename}"
5461

0 commit comments

Comments
 (0)