File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,15 @@ case $1 in
4242esac
4343
4444# Filter out symlinks from `affected_files`. We'll check the real files.
45- affected_files=$( echo " $affected_files " | xargs -r -n1 file | grep -v ' symbolic link' | cut -d: -f1 | tr ' \n' ' ' )
45+ # Use bash test operators instead of the 'file' command to avoid issues with
46+ # filenames containing special characters (colons, commas, etc).
47+ filtered_files=" "
48+ for f in $affected_files ; do
49+ if [ ! -L " $f " ]; then
50+ filtered_files=" $filtered_files $f "
51+ fi
52+ done
53+ affected_files=$( echo " $filtered_files " | xargs -r)
4654
4755# Unset variable would be a sign of programmer error. We are not using '-e' in
4856# this script as we'd like to handle these cases ourselves where relevant, i.e.,
You can’t perform that action at this time.
0 commit comments