Skip to content

Commit f6baca8

Browse files
pokeyfidgetingbits
authored andcommitted
minor tweaks to install-from-pr (#1971)
## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [-] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [-] I have not broken the cheatsheet
1 parent 4de8f02 commit f6baca8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

packages/cursorless-vscode/scripts/install-from-pr.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ if ! command -v gh &>/dev/null; then
1616
exit 1
1717
fi
1818

19+
# Ensure VSCode 'code' command is installed
20+
if ! command -v code &>/dev/null; then
21+
echo "VSCode 'code' command not found; see https://code.visualstudio.com/docs/editor/command-line#_launching-from-command-line"
22+
exit 1
23+
fi
24+
1925
pr_number="$1"
2026
repo="cursorless-dev/cursorless"
2127

@@ -27,8 +33,8 @@ if [[ $checks == *still-running ]]; then
2733
fi
2834

2935
# 2. Get desired check run (ubuntu-latest, stable)
30-
check_number=$(echo "$checks" | fgrep 'Test (ubuntu-latest, stable)' | cut -d / -f8)
31-
echo "Downloading vsix for PR $pr_number From check $check_number"
36+
check_number=$(echo "$checks" | grep -F 'Test (ubuntu-latest, stable)' | cut -d / -f8)
37+
echo "Downloading vsix for PR $pr_number from check $check_number"
3238

3339
# Temp directory to put downloaded extension
3440
tmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'cursorless-vsix')
@@ -38,7 +44,7 @@ function finish {
3844
trap finish EXIT
3945

4046
# 3. Download extension vsix
41-
gh run download $check_number --repo "$repo" --name vsix --dir "$tmpdir"
47+
gh run download "$check_number" --repo "$repo" --name vsix --dir "$tmpdir"
4248

4349
# 4. Uninstall production cursorless
4450
code --uninstall-extension pokey.cursorless || echo "Cursorless not currently installed"

0 commit comments

Comments
 (0)