diff --git a/hooks/command b/hooks/command index bd80273..2e9fe2a 100755 --- a/hooks/command +++ b/hooks/command @@ -35,7 +35,9 @@ if [[ -z ${files:-} ]] ; then fi # Read in the options to pass to shellcheck -mapfile -t options<<<"$(plugin_read_list OPTIONS)" +while IFS=$'\n' read -r option ; do + options+=("$option") +done < <(plugin_read_list OPTIONS) echo "+++ Running shellcheck on ${#files[@]} files" if docker run --rm -v "$PWD:/mnt" --workdir "/mnt" koalaman/shellcheck "${options[@]+${options[@]}}" "${files[@]}" ; then