Respect contexts with timeouts (#1948)

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
bplaxco authored and GitHub committed 2025-10-24 12:30:13 -05:00
1 parent 3821f30b06
commit c5ccbb9468
13 files changed
+350 -245

No files matched your search

+1 -2
View File
@@ -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,