build: Use cd ... || exit in case cd fails (#1107)

This commit is contained in:
Frazer Smith 2022-06-08 21:03:44 +01:00 committed by GitHub
parent 90bc38c840
commit 3737c9f4e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
. prepare_vscode.sh
cd vscode || exit
cd vscode || { echo "'vscode' dir not found"; exit 1; }
yarn monaco-compile-check
yarn valid-layers-check

View File

@ -1,6 +1,6 @@
#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode || { echo "'vscode' dir not found"; exit 1; }
input=LICENSE.txt
target=LICENSE.rtf

View File

@ -1,7 +1,7 @@
#!/bin/bash
mkdir -p vscode
cd vscode
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git init -q
git remote add origin https://github.com/Microsoft/vscode.git

View File

@ -5,7 +5,7 @@ set -e
cp -rp src/* vscode/
cp -f LICENSE vscode/LICENSE.txt
cd vscode || exit
cd vscode || { echo "'vscode' dir not found"; exit 1; }
../update_settings.sh