mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
Merge pull request #65 from clkao/execCommandJson-error
Log error output for execCommandJson as well.
This commit is contained in:
commit
069140e74a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user