summaryrefslogtreecommitdiffstats
path: root/pkg/commands/oscommands
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/oscommands')
-rw-r--r--pkg/commands/oscommands/os.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go
index af5b97ca4..1a486162f 100644
--- a/pkg/commands/oscommands/os.go
+++ b/pkg/commands/oscommands/os.go
@@ -98,7 +98,7 @@ func (c *OSCommand) RunCommandWithOutput(formatString string, formatArgs ...inte
cmd := c.ExecutableFromString(command)
output, err := sanitisedCommandOutput(cmd.CombinedOutput())
if err != nil {
- c.Log.WithField("command", command).Error(err)
+ c.Log.WithField("command", command).Error(output)
}
return output, err
}
@@ -110,7 +110,7 @@ func (c *OSCommand) CatFile(filename string) (string, error) {
cmd := c.Command(arr[0], arr[1:]...)
output, err := sanitisedCommandOutput(cmd.CombinedOutput())
if err != nil {
- c.Log.WithField("command", cmdStr).Error(err)
+ c.Log.WithField("command", cmdStr).Error(output)
}
return output, err
}