diff --git a/pkg/pillar/base/execwrapper.go b/pkg/pillar/base/execwrapper.go index ba650ab9e6..b84a0949bd 100644 --- a/pkg/pillar/base/execwrapper.go +++ b/pkg/pillar/base/execwrapper.go @@ -48,7 +48,9 @@ func (c *Command) Output() ([]byte, error) { var buf bytes.Buffer c.command.Stdout = &buf c.buffer = &buf - c.timeout = defaultTimeout + if c.timeout == 0 { + c.timeout = defaultTimeout + } return c.execCommand() } @@ -59,7 +61,9 @@ func (c *Command) CombinedOutput() ([]byte, error) { c.command.Stdout = &buf c.command.Stderr = &buf c.buffer = &buf - c.timeout = defaultTimeout + if c.timeout == 0 { + c.timeout = defaultTimeout + } return c.execCommand() }