mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: showing the entire error message when a command fails
This commit is contained in:
parent
82dd30c777
commit
dfe64ee4db
2 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue