Skip to content

Commit 11e74ae

Browse files
committed
Apply review suggestions
1 parent bafa663 commit 11e74ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hooks/_common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ function common::is_hook_run_on_whole_repo {
176176
local all_files_that_can_be_checked
177177

178178
if [ -z "$excluded_files" ]; then
179-
all_files_that_can_be_checked=$(git ls-files | sort | grep -E "$included_files" | tr '\n' ' ')
179+
all_files_that_can_be_checked=$(git ls-files | sort | grep -E -- "$included_files" | tr '\n' ' ')
180180
else
181-
all_files_that_can_be_checked=$(git ls-files | sort | grep -E "$included_files" | grep -v -E "$excluded_files" | tr '\n' ' ')
181+
all_files_that_can_be_checked=$(git ls-files | sort | grep -E -- "$included_files" | grep -v -E -- "$excluded_files" | tr '\n' ' ')
182182
fi
183183

184184
if [ "$files_to_check" == "$all_files_that_can_be_checked" ]; then

0 commit comments

Comments
 (0)