mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 04:34:46 +01:00
one tmp dir to rule them all, I think
This commit is contained in:
1 parent
56e409d9f1
commit
e0ea9cefde
7 files changed
+58
-41
No files matched your search
+2
-2
@@ -46,7 +46,7 @@ func (d *Detector) DetectGit(cmd *sources.GitCmd, remote *RemoteInfo) ([]report.
|
||||
}
|
||||
}
|
||||
|
||||
if IsArchive(gitdiffFile.NewName) {
|
||||
if isArchive(gitdiffFile.NewName) {
|
||||
// Check if commit is allowed
|
||||
d.Sema.Go(func() error {
|
||||
// Check out the archive blob to disk
|
||||
@@ -57,7 +57,7 @@ func (d *Detector) DetectGit(cmd *sources.GitCmd, remote *RemoteInfo) ([]report.
|
||||
}
|
||||
defer os.Remove(archivePath)
|
||||
|
||||
targets, tmpDir, err := ExtractArchive(archivePath)
|
||||
targets, tmpDir, err := extractArchive(archivePath)
|
||||
if err != nil {
|
||||
os.RemoveAll(tmpDir)
|
||||
logging.Warn().Err(err).Msg("failed to extract archive")
|
||||
|
||||
Reference in new issue
Block a user