Combine stdout and stderr when executing

This commit is contained in:
Lan Tian 2020-04-10 13:24:56 +08:00
parent c262ee3bdf
commit e8a58e0936
No known key found for this signature in database
GPG Key ID: 27F31700E751EC22
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ func tracerouteTryExecute(cmd []string, args [][]string) ([]byte, error) {
var err error
for i := range cmd {
instance := exec.Command(cmd[i], args[i]...)
output, err = instance.Output()
output, err = instance.CombinedOutput()
if err == nil {
return output, err
}