Skip to content

Commit

Permalink
digestcheck: fix grep --exclude using --exclude-dir
Browse files Browse the repository at this point in the history
The exclude part wasn't working because it was only matching on the name
of the file and not on the whole path, specifically the directory
structure.

Signed-off-by: Mahe Tardy <[email protected]>
  • Loading branch information
mtardy committed Nov 19, 2024
1 parent 1d48cc4 commit 0542a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/digestcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
NC=$(tput sgr0)

images=$(grep -n -r --include='*[dD]ockerfile*' --exclude='*vendor*' 'FROM' $1 | grep -E '\b\S+@\S+\b')
images=$(grep -n -r --include='*[dD]ockerfile*' --exclude-dir='*vendor*' --exclude-dir='*modules*' 'FROM' $1 | grep -E '\b\S+@\S+\b')

exit_code=0

Expand Down

0 comments on commit 0542a87

Please sign in to comment.