diff --git a/.github/workflows/bashtest.yml b/.github/workflows/bashtest.yml index b2507c8..4ae52ad 100644 --- a/.github/workflows/bashtest.yml +++ b/.github/workflows/bashtest.yml @@ -15,4 +15,7 @@ jobs: - name: Lint Bash scripts run: | - find . -name "*.sh" -print0 | xargs -0 shellcheck + find . -name "*.sh" -print0 | xargs -0 shellcheck -f gcc | tee shellcheck.log + if grep -q "error:" shellcheck.log; then + exit 1 + fi diff --git a/setup.sh b/setup.sh index 2871ab7..99e4d1d 100755 --- a/setup.sh +++ b/setup.sh @@ -25,7 +25,8 @@ if [[ ! -d "$LINUXTOOLBOXDIR/mybash" ]]; then fi fi -cd "$LINUXTOOLBOXDIR/mybash" + +cd "$LINUXTOOLBOXDIR/mybash" || exit command_exists() { command -v $1 >/dev/null 2>&1