Don't check for errors when checking if a provider is usable
If a provider is unusable then Usable() will throw an error. When checking for a default provider, Vagrant should not raise an error if there is an issue with executing Usable().
This commit is contained in:
parent
add66c4c2a
commit
ccb89c0143
@ -392,10 +392,7 @@ func (p *Project) DefaultProvider(opts *core.DefaultProviderOptions) (string, er
|
||||
if opts.CheckUsable {
|
||||
logger.Debug("Checking usable on provider", "provider", pp.Name)
|
||||
pluginImpl := plug.Plugin.(core.Provider)
|
||||
usable, err := pluginImpl.Usable()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
usable, _ := pluginImpl.Usable()
|
||||
if !usable {
|
||||
logger.Debug("Skipping unusable provider", "provider", pp.Name)
|
||||
continue
|
||||
|
||||
@ -351,7 +351,7 @@ module Vagrant
|
||||
# then look there.
|
||||
root_config = vagrantfile.config
|
||||
if opts[:machine]
|
||||
machine_info = vagrantfile.machine_config(opts[:machine])
|
||||
machine_info = vagrantfile.machine_config(opts[:machine], nil, nil, nil)
|
||||
root_config = machine_info[:config]
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user