Skip to content

Commit

Permalink
exec: avoid clobbering timeout
Browse files Browse the repository at this point in the history
Signed-off-by: eriknordmark <[email protected]>
  • Loading branch information
eriknordmark committed Oct 25, 2023
1 parent a1dc2fa commit b25d016
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/pillar/base/execwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand All @@ -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()
}

Expand Down

0 comments on commit b25d016

Please sign in to comment.