From a1de128a818e476b067164ba535b4ac0325f9038 Mon Sep 17 00:00:00 2001 From: Chia-liang Kao Date: Wed, 8 Aug 2018 23:39:19 +0800 Subject: [PATCH] Log error output for execCommandJson as well. --- pkg/cephfs/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cephfs/util.go b/pkg/cephfs/util.go index 54f354a78..33594d8ee 100644 --- a/pkg/cephfs/util.go +++ b/pkg/cephfs/util.go @@ -48,7 +48,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)