Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,13 @@ if ! command -v copilot >/dev/null 2>&1; then
printf "Would you like to add it to %s? [y/N] " "$RC_FILE"
if read -r REPLY </dev/tty 2>/dev/null; then
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]; then
mkdir -p "$(dirname "$RC_FILE")"
echo "$PATH_LINE" >> "$RC_FILE"
echo "✓ Added PATH configuration to $RC_FILE"
if grep -qxF -- "$PATH_LINE" "$RC_FILE" 2>/dev/null; then
echo "✓ PATH configuration already in $RC_FILE"
elif mkdir -p "$(dirname "$RC_FILE")" && echo "$PATH_LINE" >> "$RC_FILE"; then
echo "✓ Added PATH configuration to $RC_FILE"
else
echo "✗ Failed to update $RC_FILE (check permissions)" >&2
fi
echo " Restart your shell or run: source $RC_FILE"
fi
fi
Expand Down
Loading