Skip to content

Commit 8cfc25e

Browse files
committed
Update timeout log to handle duration less than 1s properly
1 parent d4d06e9 commit 8cfc25e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/capture/executils/shell.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func CommandCombinedOutputToWriter(writer io.Writer, cmd Command, hookers ...Hoo
204204
timer := time.NewTimer(timerDuration)
205205
select {
206206
case <-timer.C:
207-
logger.Log("Timeout happened during the command execution (%ds) [%s]", int(timerDuration/time.Second), c.String())
207+
logger.Log("Timeout happened during the command execution (%s) [%s]", timerDuration.String(), c.String())
208208
err = c.KillAndWait()
209209
if err != nil {
210210
logger.Log("Error doing cmd.KillAndWait() invocation: [%s]", err.Error())

0 commit comments

Comments
 (0)