From d3892fe7434325840f8f51dafebeb74a3ca03143 Mon Sep 17 00:00:00 2001 From: Taku Shimosawa Date: Tue, 23 May 2017 23:16:22 +0000 Subject: [PATCH] [FAB-4130] fix peer node status error reports This patch fixes [FAB-4130]. With this patch, "peer node status" command shows error messages, and exits with an error code when they encounter errors. Change-Id: I08a1556336b82af505051a7674d9486d561b6bec Signed-off-by: Taku Shimosawa --- peer/node/status.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peer/node/status.go b/peer/node/status.go index 0ace3e24b51..032988cc09d 100644 --- a/peer/node/status.go +++ b/peer/node/status.go @@ -34,8 +34,8 @@ var nodeStatusCmd = &cobra.Command{ Use: "status", Short: "Returns status of the node.", Long: `Returns the status of the running node.`, - Run: func(cmd *cobra.Command, args []string) { - status() + RunE: func(cmd *cobra.Command, args []string) error { + return status() }, }