mirror of
https://github.com/linuxserver/docker-shellcheck.git
synced 2026-02-20 00:56:23 +08:00
Exit when no TEST_AREA is found
Prevents find command on L58 from passing the current working directory to the loop
This commit is contained in:
parent
e26895a986
commit
41bfe83e37
@ -39,6 +39,12 @@ if [[ -d "${WORKSPACE}"/root/etc/s6-overlay/s6-rc.d ]]; then
|
||||
TEST_AREA+=("root/etc/s6-overlay/s6-rc.d")
|
||||
fi
|
||||
|
||||
# exit gracefully if no TEST_AREA are found
|
||||
if [[ ${#TEST_AREA[@]} -eq 0 ]]; then
|
||||
echo "no common folders found, linting not required"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# check test area for executable files
|
||||
while IFS= read -r -d '' file; do
|
||||
if head -n1 "${file}" | grep -q -E -w "sh|bash|dash|ksh"; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user