fix: showing the entire error message when a command fails

This commit is contained in:
Simone Margaritelli 2021-05-14 15:26:50 +02:00
commit dfe64ee4db
2 changed files with 7 additions and 4 deletions

View file

@ -41,7 +41,7 @@ func Exec(executable string, args []string) (string, error) {
raw, err := exec.Command(path, args...).CombinedOutput()
if err != nil {
return "", err
return str.Trim(string(raw)), err
} else {
return str.Trim(string(raw)), nil
}