1
0
Fork 0
mirror of https://github.com/ludeeus/action-shellcheck.git synced 2024-08-16 10:09:53 +02:00

Enable shellcheck for shebang with /bin/env (#22)

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
Oscar Tin Lai 2020-07-15 04:39:58 +10:00 committed by GitHub
parent 2394c9008b
commit 7ee62c0418
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ readarray -d '' filepaths < <(find . -type f "${excludes[@]}" \
readarray -d '' tmp < <(find . "${excludes[@]}" -type f ! -name '*.*' -perm /111 -print0)
for file in "${tmp[@]}"; do
head -n1 "$file" | grep -Eqs "^#! */[^ ]*/[abkz]*sh" || continue
head -n1 "$file" | grep -Eqs "^#! */[^ ]*/(env *)?[abkz]*sh" || continue
filepaths+=("$file")
done