mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-03 20:50:59 -05:00
Merge 7650e3dce8 into ba5c4ac5e3
This commit is contained in:
commit
c0bae9acd9
2 changed files with 9 additions and 1 deletions
|
|
@ -656,7 +656,7 @@ func (c *InitCommand) getProviders(ctx context.Context, config *configs.Config,
|
|||
}
|
||||
|
||||
// Jump in here and add a warning if any of the providers are incomplete.
|
||||
if len(incompleteProviders) > 0 {
|
||||
if len(incompleteProviders) > 0 && !inst.GlobalCacheDirMayBreakDependencyLockFile() {
|
||||
// We don't really care about the order here, we just want the
|
||||
// output to be deterministic.
|
||||
sort.Slice(incompleteProviders, func(i, j int) bool {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,14 @@ func (i *Installer) SetGlobalCacheDirMayBreakDependencyLockFile(mayBreak bool) {
|
|||
i.globalCacheDirMayBreakDependencyLockFile = mayBreak
|
||||
}
|
||||
|
||||
// GlobalCacheDirMayBreakDependencyLockFile returns true when
|
||||
// temporary exception to the rule that the global cache directory can be used
|
||||
// only when entries are confirmed by existing entries in the dependency lock
|
||||
// file is activated.
|
||||
func (i *Installer) GlobalCacheDirMayBreakDependencyLockFile() bool {
|
||||
return i.globalCacheDirMayBreakDependencyLockFile
|
||||
}
|
||||
|
||||
// HasGlobalCacheDir returns true if someone has previously called
|
||||
// SetGlobalCacheDir to configure a global cache directory for this installer.
|
||||
func (i *Installer) HasGlobalCacheDir() bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue