From 7f9bc6dcb4705887ed00f2a105e7c16c52a0ad8b Mon Sep 17 00:00:00 2001 From: Andrew Jeddeloh Date: Wed, 10 Apr 2019 15:16:26 -0700 Subject: [PATCH] providers/vmware: update for new vmware library vmcheck.IsVirtualWorld() now can also return an error. Handle that. --- internal/providers/vmware/vmware_amd64.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/providers/vmware/vmware_amd64.go b/internal/providers/vmware/vmware_amd64.go index 82897b403..e9b0334e2 100644 --- a/internal/providers/vmware/vmware_amd64.go +++ b/internal/providers/vmware/vmware_amd64.go @@ -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 }