-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition of IFS=$'\n'
caused ugly warnings if --register-aws
set
#29
Comments
IFS=$'\n'
caused ugly warnings if --register-aws
is setIFS=$'\n'
caused ugly warnings if --register-aws
set
Setting diff --git a/git-secrets b/git-secrets
index a02b437..bfce877 100755
--- a/git-secrets
+++ b/git-secrets
@@ -49,7 +49,7 @@ load_patterns() {
git config --get-all secrets.patterns
# Execute each provider and use their output to build up patterns
git config --get-all secrets.providers | while read cmd; do
- echo "$($cmd)"
+ echo "$(export IFS=$'\n\t '; $cmd)"
done
} |
Thanks for the report and the proposed fix. Can you send a PR? |
Submitted #30 |
@mtdowling any idea how quickly this will hit homebrew once the this PR is accepted? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Commit 9fa6d45 added
IFS=$'\n'
here which causes problems in theload_patterns
function on line 52. WithIFS=$'\n'
and--register-aws
set we see the following error when committing:We suspect (but did not verify) that this breaks the scanning of credentials found in
~/.aws/credentials
.Adding the following test-case to
test/pre-commit.bats
demonstrates the error:Setting
IFS=$'\n '
resolves this issue above but breaks the Rejects commits with prohibited patterns in changeset with filename that contain spaces test case.-- Chris (@xoebus) and Aram (@aramprice)
The text was updated successfully, but these errors were encountered: