Skip to content

Commit

Permalink
Merge pull request awslabs#54 from teo-scout24/master
Browse files Browse the repository at this point in the history
Fix for pre-commit hook failure on bash 4
  • Loading branch information
mtdowling authored Dec 6, 2017
2 parents c97cc2c + 9a9d995 commit 99800b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ scan_history() {
# Looks for differences matching the patterns, reduces the number of revisions to scan
local to_scan=$(git log --all -G"${combined_patterns}" --pretty=%H)
# Scan through revisions with findings to normalize output
output=$(git_grep "" "${to_scan}")
output=$(GREP_OPTIONS= LC_ALL=C git grep -nwHEI "${combined_patterns}" $to_scan)
process_output $? "${output}"
}

Expand All @@ -112,7 +112,7 @@ git_grep() {
local options="$1"; shift
local files=$@ combined_patterns=$(load_combined_patterns)
[ -z "${combined_patterns}" ] && return 1
GREP_OPTIONS= LC_ALL=C git grep -nwHEI ${options} "${combined_patterns}" $files
GREP_OPTIONS= LC_ALL=C git grep -nwHEI ${options} "${combined_patterns}" -- $files
}

# Performs a regular grep, taking into account patterns and recursion.
Expand Down

0 comments on commit 99800b9

Please sign in to comment.