Skip to content
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

grep: warning: stray \ before - #217

Open
wknapik opened this issue Sep 15, 2022 · 1 comment
Open

grep: warning: stray \ before - #217

wknapik opened this issue Sep 15, 2022 · 1 comment

Comments

@wknapik
Copy link

wknapik commented Sep 15, 2022

On commit, I get

grep: warning: stray \ before -

that's caused by the following pattern

% git config --get-all secrets.patterns|grep ACCOUNT                                                                                          
("|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?("|')?\s*(:|=>|=)\s*("|')?[0-9]{4}\-?[0-9]{4}\-?[0-9]{4}("|')?
%

as demonstrated by

% grep -E "(\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')?"
grep: warning: stray \ before -
grep: warning: stray \ before -

This is on up-to-date Arch Linux and git-secrets 1.3.0 (the latest tag, from 3.5 years ago, which contains the latest master version of the git-secrets script).

@jeje232
Copy link

jeje232 commented Oct 19, 2023

Hello,

Any new about this issue?
I have same problem with the 3.18.3 official Alpine docker image with the las grep upgrade.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants