Merge pull request #12879 from soapy1/provider-flag

Provider flag
This commit is contained in:
Sophia Castellarin 2022-09-21 15:41:15 -04:00 committed by GitHub
commit efd62b892c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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