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

fix: File enumeration fails on older git binary #150

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bigpick
Copy link
Member

@bigpick bigpick commented May 6, 2024

Info

Closes #148. On systems with older versions of git (i.e centOS7 in that issue) the -C <path> option is not supported. This flag was added back in 1.8.5 (git/git@44e1e4d)... And since the error is not getting logged, this results in a silent truncation of the entire .secrets.baseline file.

This PR does two things:

  1. Attempts to use an alternative/equivalent flag if the version of git detected is < 1.8.5 via --git-dir <path>/.git
  2. Surfaces the error (if any is encountered) when running the git command to enumerate the files, which would have made the original issue more clear what was wrong.

@bigpick
Copy link
Member Author

bigpick commented May 6, 2024

(looking at tests)

bigpick added 3 commits May 6, 2024 12:14
Signed-off-by: George Pickering <[email protected]>
Signed-off-by: George Pickering <[email protected]>
Signed-off-by: George Pickering <[email protected]>
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

Successfully merging this pull request may close these issues.

[BUG] Regression in 0.13.1+ibm.62.dss resulting in results being wiped out from baseline file
1 participant