Skip to content

Commit 0b8a068

Browse files
author
Akash Satheesan
authored
fix(update-vscode): add check/docs for git-subtree (#3129)
1 parent 97fbbfa commit 0b8a068

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ci/dev/update-vscode.sh

+13-1
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,20 @@ main() {
5656
echo "jq could not be found."
5757
echo "We use this when looking up the exact version to update to in the package.json in VS Code."
5858
echo -e "See docs here: https://stedolan.github.io/jq/download/"
59-
exit
59+
exit 1
60+
fi
61+
62+
# Note: `git subtree` returns 129 when installed, and prints help;
63+
# but when uninstalled, returns 1.
64+
set +e
65+
git subtree &>/dev/null
66+
if [ $? -ne 129 ]; then
67+
echo "git-subtree could not be found."
68+
echo "We use this to fetch and update the lib/vscode subtree."
69+
echo -e "Please install git subtree."
70+
exit 1
6071
fi
72+
set -e
6173

6274
# Grab the exact version from package.json
6375
VSCODE_EXACT_VERSION=$(curl -s "https://raw.githubusercontent.com/microsoft/vscode/release/$VSCODE_VERSION_TO_UPDATE/package.json" | jq -r ".version")

docs/CONTRIBUTING.md

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ To develop inside an isolated Docker container:
6868

6969
### Updating VS Code
7070

71+
Updating VS Code requires `git subtree`. On some rpm-based Linux distros, `git subtree` is not included by default, and needs to be installed separately.
72+
To install, run `dnf install git-subtree` or `yum install git-subtree` as necessary.
73+
7174
To update VS Code, follow these steps:
7275

7376
1. Run `yarn update:vscode`.

0 commit comments

Comments
 (0)