Skip to content

Commit 01b4b11

Browse files
devm33Copilot
andauthored
Update install.sh
Co-authored-by: Copilot <[email protected]>
1 parent 673aef0 commit 01b4b11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ else
5555
PREFIX="${PREFIX:-$HOME/.local}"
5656
fi
5757
INSTALL_DIR="$PREFIX/bin"
58-
mkdir -p "$INSTALL_DIR"
58+
if ! mkdir -p "$INSTALL_DIR"; then
59+
echo "Error: Could not create directory $INSTALL_DIR. You may not have write permissions." >&2
60+
echo "Try running this script with sudo or set PREFIX to a directory you own (e.g., export PREFIX=\$HOME/.local)." >&2
61+
exit 1
62+
fi
5963

6064
# Install binary
6165
if [ -f "$DOWNLOAD_DIR/copilot" ]; then

0 commit comments

Comments
 (0)