Skip to content

Commit 56c9ed8

Browse files
committed
Use tar -C instead of cd
1 parent 4e028d9 commit 56c9ed8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ DOWNLOAD_DIR="${HOME}/.copilot"
2828
mkdir -p "$DOWNLOAD_DIR"
2929

3030
# Download and extract
31-
cd "$DOWNLOAD_DIR"
3231
if command -v curl >/dev/null 2>&1; then
33-
curl -fsSL "$DOWNLOAD_URL" | tar -xz
32+
curl -fsSL "$DOWNLOAD_URL" | tar -xz -C "$DOWNLOAD_DIR"
3433
elif command -v wget >/dev/null 2>&1; then
35-
wget -qO- "$DOWNLOAD_URL" | tar -xz
34+
wget -qO- "$DOWNLOAD_URL" | tar -xz -C "$DOWNLOAD_DIR"
3635
else
3736
echo "Error: Neither curl nor wget found. Please install one of them."
3837
exit 1

0 commit comments

Comments
 (0)