Raise error if no guest plugins found

This commit is contained in:
sophia 2022-02-22 17:13:47 -06:00 committed by Paul Hinze
parent 1cfbea7437
commit 727bf91b18
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -100,8 +100,11 @@ func (m *Machine) Guest() (g core.Guest, err error) {
// actually start getting used
if m.target.Configuration.ConfigVm.Guest != "" {
// Ignore error about guest not being found - will also try detecting the guest
guest, _ := m.project.basis.component(
guest, cerr := m.project.basis.component(
m.ctx, component.GuestType, m.target.Configuration.ConfigVm.Guest)
if cerr != nil {
return nil, cerr
}
if guest != nil {
m.guest = guest.Value.(core.Guest)
m.seedPlugin(m.guest)