mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
Respect contexts with timeouts (#1948)
rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
1 parent
3821f30b06
commit
c5ccbb9468
13 files changed
+350
-245
No files matched your search
+1
-2
@@ -1,7 +1,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@@ -38,7 +37,7 @@ func runStdIn(cmd *cobra.Command, _ []string) {
|
||||
exitCode := mustGetIntFlag(cmd, "exit-code")
|
||||
|
||||
findings, err := detector.DetectSource(
|
||||
context.Background(),
|
||||
cmd.Context(),
|
||||
&sources.File{
|
||||
Content: os.Stdin,
|
||||
MaxArchiveDepth: detector.MaxArchiveDepth,
|
||||
|
||||
Reference in new issue
Block a user