mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
Log error output for execCommandJson as well.
This commit is contained in:
parent
6f484f92fc
commit
a1de128a81
@ -48,7 +48,7 @@ func execCommandJson(v interface{}, program string, args ...string) error {
|
|||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
|
|
||||||
if err != nil {
|
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)
|
return json.NewDecoder(bytes.NewReader(out)).Decode(v)
|
||||||
|
Loading…
Reference in New Issue
Block a user