Don't error if there are no files to shellcheck

This commit is contained in:
The Magician 2023-12-07 15:31:43 +00:00
parent 7607234756
commit ddea23dc30
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,9 @@ function main {
files[${files[@]}+1]="$file"
done < <(get_shell_files)
shellcheck "${files[@]}"
if [[ "${#files[@]}" -ne 0 ]]; then
shellcheck "${files[@]}"
fi
}
main