Skip to content

Commit

Permalink
Fix wrong glob (again)
Browse files Browse the repository at this point in the history
By default `**` behaves the same as two `*` side by side, i.e. it only
globs file paths, not directories. `shopt -s globstar` needs to be set
for it to mean a directory. I didn't notice this before now because
`globstar` is set by default in interactive mode, but not otherwise.
  • Loading branch information
jyn514 committed Jan 24, 2021
1 parent 0ede2d3 commit 415a3e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/check_line_lengths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if [ "$MAX_LINE_LENGTH" == "" ]; then
fi

if [ "$1" == "" ]; then
files=( src/**.md )
shopt -s globstar
files=( src/**/*.md )
else
files=( "$@" )
fi
Expand Down

0 comments on commit 415a3e8

Please sign in to comment.