From 43ae029bfebfe58b943dd136b78afe9ca800cfd8 Mon Sep 17 00:00:00 2001 From: Danny Moesch Date: Wed, 30 Dec 2020 15:38:03 +0100 Subject: [PATCH] Use 'exit' to return from a Bash script --- scripts/swiftformat.sh | 4 ++-- scripts/swiftlint.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/swiftformat.sh b/scripts/swiftformat.sh index 728d5ad..40d90f6 100755 --- a/scripts/swiftformat.sh +++ b/scripts/swiftformat.sh @@ -2,12 +2,12 @@ SWIFTFORMAT_VERSION="0.47.*" if [[ "${CI}" == "true" ]]; then echo "Running in a Continuous Integration environment. Formatting is skipped." - return + exit 0 fi if [[ "${CONFIGURATION}" != "Debug" ]]; then echo "Running during a release build. Formatting is skipped." - return + exit 0 fi if which swiftformat > /dev/null; then diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index db8177c..5ba563b 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -2,12 +2,12 @@ SWIFTLINT_VERSION="0.42.*" if [[ "${CI}" == "true" ]]; then echo "Running in a Continuous Integration environment. Linting is skipped." - return + exit 0 fi if [[ "${CONFIGURATION}" != "Debug" ]]; then echo "Running during a release build. Linting is skipped." - return + exit 0 fi if which swiftlint > /dev/null; then