Skip to content

Commit

Permalink
Propagate the error and dont return stderr which is empty
Browse files Browse the repository at this point in the history
stderr output is always empty for commands executed with ssh.
  • Loading branch information
guillaumerose committed Nov 5, 2020
1 parent 4d976ec commit d8c3e4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/crc/cluster/clusteroperator.go
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8c3e4a

Please sign in to comment.