@@ -15,10 +15,10 @@ main() {
15
15
16
16
# Ask which version we should update to
17
17
# In the future, we'll automate this and grab the latest version automatically
18
- read -p " What version of VSCode would you like to update to? (i.e. 1.52) " VSCODE_VERSION_TO_UPDATE
18
+ read -r - p " What version of VSCode would you like to update to? (i.e. 1.52) " VSCODE_VERSION_TO_UPDATE
19
19
20
20
# Check that this version exists
21
- if [[ -z $( git ls-remote --heads vscode release/$VSCODE_VERSION_TO_UPDATE ) ]]; then
21
+ if [[ -z $( git ls-remote --heads vscode release/" $VSCODE_VERSION_TO_UPDATE " ) ]]; then
22
22
echo " Oops, that doesn't look like a valid version."
23
23
echo " You entered: $VSCODE_VERSION_TO_UPDATE "
24
24
echo " Verify that this branches exists here: https://github.com/microsoft/vscode/branches/all?query=release%2F$VSCODE_VERSION_TO_UPDATE "
@@ -39,10 +39,10 @@ main() {
39
39
# If we don't do this, the opening a draft PR step won't work
40
40
# because it will stop and ask where you want to push the branch
41
41
CURRENT_BRANCH=$( git branch --show-current)
42
- if [[ -z $( git ls-remote --heads origin $CURRENT_BRANCH ) ]]; then
42
+ if [[ -z $( git ls-remote --heads origin " $CURRENT_BRANCH " ) ]]; then
43
43
echo " Doesn't look like you've pushed this branch to remote"
44
44
echo -e " Pushing now using: git push origin $CURRENT_BRANCH \n"
45
- git push origin $CURRENT_BRANCH
45
+ git push origin " $CURRENT_BRANCH "
46
46
fi
47
47
48
48
echo " Opening a draft PR on GitHub"
@@ -52,7 +52,7 @@ main() {
52
52
echo " Going to try to update vscode for you..."
53
53
echo -e " Running: git subtree pull --prefix lib/vscode vscode release/${VSCODE_VERSION_TO_UPDATE} --squash\n"
54
54
# Try to run subtree update command
55
- git subtree pull --prefix lib/vscode vscode release/${VSCODE_VERSION_TO_UPDATE} --squash --message " chore(vscode): update to $VSCODE_VERSION_TO_UPDATE "
55
+ git subtree pull --prefix lib/vscode vscode release/" ${VSCODE_VERSION_TO_UPDATE} " --squash --message " chore(vscode): update to $VSCODE_VERSION_TO_UPDATE "
56
56
}
57
57
58
58
main " $@ "
0 commit comments