Resolve SC2164: 'Use cd ... || exit in case cd fails.'

https://github.com/koalaman/shellcheck/wiki/SC2164
This commit is contained in:
Dan Callahan committed 2015-11-03 21:55:09 -06:00
1 parent 279c49f084
commit 1de54d52ac
1 file changed
+2 -2
+2 -2
View File
@@ -112,7 +112,7 @@ deploy_app() {
GIT_REMOTE="$2"; GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"} GIT_REMOTE="$2"; GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"}
TMP=$(mktemp -d -t "dokku.me.XXXXX") TMP=$(mktemp -d -t "dokku.me.XXXXX")
rmdir $TMP && cp -r ./tests/apps/$APP_TYPE $TMP rmdir $TMP && cp -r ./tests/apps/$APP_TYPE $TMP
cd $TMP cd $TMP || exit 1
git init git init
git config user.email "robot@example.com" git config user.email "robot@example.com"
git config user.name "Test Robot" git config user.name "Test Robot"
@@ -128,7 +128,7 @@ deploy_app() {
setup_client_repo() { setup_client_repo() {
TMP=$(mktemp -d -t "dokku.me.XXXXX") TMP=$(mktemp -d -t "dokku.me.XXXXX")
rmdir $TMP && cp -r ./tests/apps/nodejs-express $TMP rmdir $TMP && cp -r ./tests/apps/nodejs-express $TMP
cd $TMP cd $TMP || exit 1
git init git init
git config user.email "robot@example.com" git config user.email "robot@example.com"
git config user.name "Test Robot" git config user.name "Test Robot"