File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -249,8 +249,8 @@ func (c *ProvidersLockCommand) Run(args []string) int {
249249
250250 // Use global plugin cache for extra speed if this architecture matches the systems (and therefore the caches) one
251251 globalCacheDir := c .providerGlobalCacheDir ()
252- if globalCacheDir != nil && platform == getproviders . CurrentPlatform {
253- installer .SetGlobalCacheDir (globalCacheDir )
252+ if globalCacheDir != nil {
253+ installer .SetGlobalCacheDir (globalCacheDir . WithPlatform ( platform ) )
254254 installer .SetGlobalCacheDirMayBreakDependencyLockFile (c .PluginCacheMayBreakDependencyLockFile )
255255 }
256256
Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ func (d *Dir) BasePath() string {
7575 return filepath .Clean (d .baseDir )
7676}
7777
78+ // WithPlatform creates a new dir with the provided platform based
79+ // on this dir
80+ func (d * Dir ) WithPlatform (platform getproviders.Platform ) * Dir {
81+ return NewDirWithPlatform (d .baseDir , platform )
82+ }
83+
7884// AllAvailablePackages returns a description of all of the packages already
7985// present in the directory. The cache entries are grouped by the provider
8086// they relate to and then sorted by version precedence, with highest
You can’t perform that action at this time.
0 commit comments