This commit is contained in:
Oleksii Prudkyi 2026-02-03 17:56:39 +00:00 committed by GitHub
commit c0bae9acd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

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

View file

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