mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-25 16:44:01 +08:00
When FreeBSD command fails, print the error, not stdout.
This commit is contained in:
parent
d7a48b8a22
commit
24ea6dc80d
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ func RunCmdFormatted(command string, printerr bool) (string, error) {
|
|||
out, err := cmd.CombinedOutput()
|
||||
if err != nil && printerr {
|
||||
logger.Log(0, "error running command: ", command)
|
||||
logger.Log(0, strings.TrimSuffix(string(out), "\n"))
|
||||
logger.Log(0, strings.TrimSuffix(string(err), "\n"))
|
||||
}
|
||||
return string(out), err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue