Skip to content

Commit 30034c7

Browse files
devm33Copilot
andcommitted
install: guide user to update PATH for current shell session
When copilot is not on PATH after install, the script now: - Tells users to restart their shell or source their RC file after adding the PATH export - Provides a copy-pasteable one-liner (export PATH + copilot help) that fixes PATH for the current session and runs the getting started command - Only shows the simple 'copilot help' message when it will actually work Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9277ab5 commit 30034c7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

install.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,19 @@ if ! command -v copilot >/dev/null 2>&1; then
156156
if [ "$REPLY" = "y" ] || [ "$REPLY" = "Y" ]; then
157157
echo "export PATH=\"$INSTALL_DIR:\$PATH\"" >> "$RC_FILE"
158158
echo "✓ Added PATH export to $RC_FILE"
159+
echo " Restart your shell or run: source $RC_FILE"
159160
fi
160161
fi
161162
else
162163
echo ""
163164
echo "To add $INSTALL_DIR to your PATH permanently, add this to $RC_FILE:"
164165
echo " export PATH=\"$INSTALL_DIR:\$PATH\""
165166
fi
166-
fi
167167

168-
echo ""
169-
echo "Installation complete! Run 'copilot help' to get started."
168+
echo ""
169+
echo "Installation complete! To get started, run:"
170+
echo " export PATH=\"$INSTALL_DIR:\$PATH\" && copilot help"
171+
else
172+
echo ""
173+
echo "Installation complete! Run 'copilot help' to get started."
174+
fi

0 commit comments

Comments
 (0)