fix: do not fail when provider symlink is broken. Only print a warning.

fix https://github.com/hashicorp/terraform/issues/27445
This commit is contained in:
Romain Philibert 2021-01-08 11:18:13 +01:00
parent 5132abf638
commit 5ae5c99ba0
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ func SearchLocalDirectory(baseDir string) (map[addrs.Provider]PackageMetaList, e
// filesystem object below.
info, err = os.Stat(fullPath)
if err != nil {
return fmt.Errorf("failed to read metadata about %s: %s", fullPath, err)
log.Printf("[WARN] failed to read metadata about %s: %s", fullPath, err)
return nil
}
switch len(parts) {