Skip to content

Commit

Permalink
machine.Status: Remove redundant code
Browse files Browse the repository at this point in the history
No need to fetch the bundle metadata twice.
  • Loading branch information
cfergeau committed Jun 19, 2020
1 parent 26ae4de commit a5d708c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/crc/machine/machine.go
Expand Up @@ -601,10 +601,7 @@ func Status(statusConfig ClusterStatusConfig) (ClusterStatusResult, error) {
switch {
case operatorsStatus.Available:
openshiftVersion := "4.x"
_, crcBundleMetadata, err := getBundleMetadataFromDriver(host.Driver)
if err != nil {
logging.Debugf("Failed to load bundle metadata: %s", err.Error())
} else if crcBundleMetadata.GetOpenshiftVersion() != "" {
if crcBundleMetadata.GetOpenshiftVersion() != "" {
openshiftVersion = crcBundleMetadata.GetOpenshiftVersion()
}
openshiftStatus = fmt.Sprintf("Running (v%s)", openshiftVersion)
Expand Down

0 comments on commit a5d708c

Please sign in to comment.