Skip to content

Commit 8b8d701

Browse files
authored
Merge pull request #175 from sijeesh/exec_timeout_fix
ExecCommandOutputWithTimeout-timeout parameter fix
2 parents b57bfd5 + c5ed87c commit 8b8d701

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

util/cmd.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ package util
1919
import (
2020
"bytes"
2121
"fmt"
22-
log "github.com/hpe-storage/common-host-libs/logger"
2322
"os/exec"
2423
"regexp"
2524
"strings"
2625
"syscall"
2726
"time"
27+
28+
log "github.com/hpe-storage/common-host-libs/logger"
2829
)
2930

3031
const (
@@ -82,8 +83,9 @@ func execCommandOutputWithTimeout(cmd string, args []string, stdinArgs []string,
8283

8384
// ExecCommandOutputWithTimeout executes ExecCommandOutput with the specified timeout
8485
func ExecCommandOutputWithTimeout(cmd string, args []string, timeout int) (string, int, error) {
85-
return execCommandOutputWithTimeout(cmd, args, []string{}, defaultTimeout)
86+
return execCommandOutputWithTimeout(cmd, args, []string{}, timeout)
8687
}
88+
8789
// ExecCommandOutput returns stdout and stderr in a single string, the return code, and error.
8890
// If the return code is not zero, error will not be nil.
8991
// Stdout and Stderr are dumped to the log at the debug level.

0 commit comments

Comments
 (0)