Skip to content

Commit

Permalink
Merge pull request #65 from clkao/execCommandJson-error
Browse files Browse the repository at this point in the history
Log error output for execCommandJson as well.
  • Loading branch information
gman0 authored Aug 8, 2018
2 parents 4fcd5eb + a1de128 commit 069140e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cephfs/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func execCommandJson(v interface{}, program string, args ...string) error {
out, err := cmd.CombinedOutput()

if err != nil {
return err
return fmt.Errorf("cephfs: %s failed with following error: %s\ncephfs: %s output: %s", program, err, program, out)
}

return json.NewDecoder(bytes.NewReader(out)).Decode(v)
Expand Down

0 comments on commit 069140e

Please sign in to comment.