Skip to content

Commit a949dc9

Browse files
committed
Check if copilot is available instead of parsing PATH
1 parent 3fa6453 commit a949dc9

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

install.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,13 @@ chmod +x "$INSTALL_DIR/copilot"
122122
echo "✓ GitHub Copilot CLI installed to $INSTALL_DIR/copilot"
123123
rm -rf "$TMP_DIR"
124124

125-
# Check if install directory is in PATH
126-
case ":$PATH:" in
127-
*":$INSTALL_DIR:"*) ;;
128-
*)
129-
echo ""
130-
echo "Warning: $INSTALL_DIR is not in your PATH"
131-
echo "Add it to your PATH by adding this line to your shell profile:"
132-
echo " export PATH=\"\$PATH:$INSTALL_DIR\""
133-
;;
134-
esac
125+
# Check if installed binary is accessible
126+
if ! command -v copilot >/dev/null 2>&1; then
127+
echo ""
128+
echo "Warning: $INSTALL_DIR is not in your PATH"
129+
echo "Add it to your PATH by adding this line to your shell profile:"
130+
echo " export PATH=\"\$PATH:$INSTALL_DIR\""
131+
fi
135132

136133
echo ""
137134
echo "Installation complete! Run 'copilot help' to get started."

0 commit comments

Comments
 (0)