Skip to content

Commit 19ab304

Browse files
authored
Merge pull request #1091 from rajasec/ps-errors
ps error logging improvement
2 parents 88b4c48 + 528bf37 commit 19ab304

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ps.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ var psCommand = cli.Command{
5151
psArgs = []string{"-ef"}
5252
}
5353

54-
output, err := exec.Command("ps", psArgs...).Output()
54+
cmd := exec.Command("ps", psArgs...)
55+
output, err := cmd.CombinedOutput()
5556
if err != nil {
56-
return err
57+
return fmt.Errorf("%s: %s", err, output)
5758
}
5859

5960
lines := strings.Split(string(output), "\n")

0 commit comments

Comments
 (0)