mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:44:45 +00:00
fix strict bash pipefail
This commit is contained in:
5
scripts/check-syntax.sh
vendored
5
scripts/check-syntax.sh
vendored
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2022, deadc0de6
|
||||
|
||||
# stop on first error
|
||||
set -euo errtrace pipefail
|
||||
set -eu -o errtrace -o pipefail
|
||||
|
||||
# ensure binaries are here
|
||||
if ! which shellcheck >/dev/null 2>&1; then
|
||||
@@ -50,7 +50,8 @@ echo "---------------------------------"
|
||||
echo "checking for bash strict mode"
|
||||
find tests-ng -iname '*.sh' | while read -r script; do
|
||||
#grep 'set +e' "${script}" 2>&1 >/dev/null && echo "set +e found in ${script}" && exit 1
|
||||
grep 'set -euo errtrace pipefail' "${script}" >/dev/null 2>&1 || (echo "set -euo errtrace pipefail not set in ${script}" && exit 1 )
|
||||
grep 'set -eu -o errtrace -o pipefail' "${script}" >/dev/null 2>&1 || \
|
||||
(echo "\"set -eu -o errtrace -o pipefail\" not set in ${script}" && exit 1 )
|
||||
done
|
||||
|
||||
# PEP8 tests
|
||||
|
||||
Reference in New Issue
Block a user