Skip to content

Commit fd4fd62

Browse files
committed
fix: handle invalid values for Windows patch scan timeout
- Set `windowsPatchScanTimeout` to 0 when provided value is less than 1.
1 parent bde2269 commit fd4fd62

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • cmd/murphy/internal/scan

cmd/murphy/internal/scan/cmd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ func envScanRun(cmd *cobra.Command, args []string) {
241241
}
242242
logger := logctx.Use(ctx).Sugar()
243243
var r *model.ScanTask
244+
if windowsPatchScanTimeout < 1 {
245+
windowsPatchScanTimeout = 0
246+
}
244247
var windowsPatchScanTimeoutDuration = time.Duration(windowsPatchScanTimeout) * time.Second
245248
if disableWindowsPatchScan {
246249
windowsPatchScanTimeoutDuration = 0

0 commit comments

Comments
 (0)