Return an error if the provider is not usable
This commit is contained in:
parent
7403835511
commit
3be4eacaa9
@ -392,11 +392,14 @@ 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, _ := pluginImpl.Usable()
|
||||
usable, err := pluginImpl.Usable()
|
||||
if !usable {
|
||||
logger.Debug("Skipping unusable provider", "provider", pp.Name)
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
}
|
||||
|
||||
// If we made it here we have a candidate usable provider
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user