diff --git a/util/cmd.go b/util/cmd.go index 9a64eac..52ced4b 100644 --- a/util/cmd.go +++ b/util/cmd.go @@ -19,12 +19,13 @@ package util import ( "bytes" "fmt" - log "github.com/hpe-storage/common-host-libs/logger" "os/exec" "regexp" "strings" "syscall" "time" + + log "github.com/hpe-storage/common-host-libs/logger" ) const ( @@ -82,8 +83,9 @@ func execCommandOutputWithTimeout(cmd string, args []string, stdinArgs []string, // ExecCommandOutputWithTimeout executes ExecCommandOutput with the specified timeout func ExecCommandOutputWithTimeout(cmd string, args []string, timeout int) (string, int, error) { - return execCommandOutputWithTimeout(cmd, args, []string{}, defaultTimeout) + return execCommandOutputWithTimeout(cmd, args, []string{}, timeout) } + // ExecCommandOutput returns stdout and stderr in a single string, the return code, and error. // If the return code is not zero, error will not be nil. // Stdout and Stderr are dumped to the log at the debug level.