We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dc17e64 + fab54a7 commit b956476Copy full SHA for b956476
1 file changed
internal/registry/registry_cache.go
@@ -187,7 +187,15 @@ func (r *Cache) CreateCache() error {
187
return err
188
}
189
190
- return os.Rename(w.Filesystem.Root(), r.Root)
+ err = os.Rename(w.Filesystem.Root(), r.Root)
191
+ if err != nil {
192
+ if err == os.ErrExist {
193
+ // If pack is run concurrently, this action might have already occurred
194
+ return nil
195
+ }
196
+ return err
197
198
199
200
201
func (r *Cache) validateCache() error {
0 commit comments