From d8c3e4a0bf174d303a7e2202d507c2785f57bf05 Mon Sep 17 00:00:00 2001 From: Guillaume Rose Date: Tue, 3 Nov 2020 16:28:11 +0100 Subject: [PATCH] Propagate the error and dont return stderr which is empty stderr output is always empty for commands executed with ssh. --- pkg/crc/cluster/clusteroperator.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/crc/cluster/clusteroperator.go b/pkg/crc/cluster/clusteroperator.go index 989fae43b2..1e58d22250 100644 --- a/pkg/crc/cluster/clusteroperator.go +++ b/pkg/crc/cluster/clusteroperator.go @@ -3,7 +3,6 @@ package cluster import ( "encoding/json" "errors" - "fmt" "github.com/code-ready/crc/pkg/crc/logging" "github.com/code-ready/crc/pkg/crc/oc" @@ -34,9 +33,9 @@ func getStatus(ocConfig oc.Config, selector []string) (*Status, error) { Available: true, } - data, stderr, err := ocConfig.RunOcCommandPrivate("get", "co", "-ojson") + data, _, err := ocConfig.RunOcCommandPrivate("get", "co", "-ojson") if err != nil { - return cs, fmt.Errorf("%s", stderr) + return cs, err } var co openshiftapi.ClusterOperatorList