Skip to content

Commit

Permalink
providers/vmware: update for new vmware library
Browse files Browse the repository at this point in the history
vmcheck.IsVirtualWorld() now can also return an error. Handle that.
  • Loading branch information
Andrew Jeddeloh committed Apr 11, 2019
1 parent 219ed02 commit 7f9bc6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/providers/vmware/vmware_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ import (
"github.com/coreos/ignition/v2/internal/providers/util"
"github.com/coreos/ignition/v2/internal/resource"

"github.com/sigma/vmw-guestinfo/rpcvmx"
"github.com/sigma/vmw-guestinfo/vmcheck"
"github.com/vmware/vmw-guestinfo/rpcvmx"
"github.com/vmware/vmw-guestinfo/vmcheck"
"github.com/vmware/vmw-ovflib"
)

func FetchConfig(f resource.Fetcher) (types.Config, report.Report, error) {
if !vmcheck.IsVirtualWorld() {
if isVM, err := vmcheck.IsVirtualWorld(); err != nil {
return types.Config{}, report.Report{}, err
} else if !isVM {
return types.Config{}, report.Report{}, providers.ErrNoProvider
}

Expand Down

0 comments on commit 7f9bc6d

Please sign in to comment.