Skip to content

Commit fe9686a

Browse files
committed
Attempt to use winget
1 parent c068e98 commit fe9686a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

install.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,19 @@ set -e
1212
echo "Installing GitHub Copilot CLI..."
1313

1414
# Detect platform
15-
case "$(uname -s)" in
15+
case "$(uname -s || echo "")" in
1616
Darwin*) PLATFORM="darwin" ;;
1717
Linux*) PLATFORM="linux" ;;
18-
*) echo "Error: Unsupported platform $(uname -s). For Windows, we recommend using: winget install GitHub.Copilot" >&2 ; exit 1 ;;
18+
*)
19+
if command -v winget >/dev/null 2>&1; then
20+
echo "Windows detected. Installing via winget..."
21+
winget install GitHub.Copilot
22+
exit $?
23+
else
24+
echo "Error: Windows detected but winget not found. Please see https://gh.io/install-copilot-readme" >&2
25+
exit 1
26+
fi
27+
;;
1928
esac
2029

2130
# Detect architecture

0 commit comments

Comments
 (0)