File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -218,15 +218,11 @@ fetchPackagesToLocalCache packages = do
218
218
GitPackage gitPackage -> do
219
219
-- for git repos it's a little more involved since cloning them takes a while and we risk race conditions
220
220
-- and possibly cloning the same repo multiple times - so we use a lock on the git url to prevent that
221
- case Map .lookup gitPackage.git gitLocks of
222
- Nothing -> do
223
- -- This is not supposed to happen but we just move on if it does
224
- getGitPackageInLocalCache name gitPackage
225
- Just lock -> do
226
- -- Take the lock, do the git thing, release the lock
227
- liftAff $ AVar .take lock
228
- getGitPackageInLocalCache name gitPackage
229
- liftAff $ AVar .put unit lock
221
+ let lock = Map .lookup gitPackage.git gitLocks
222
+ -- Take the lock, do the git thing, release the lock
223
+ liftAff $ AVar .take `traverse_` lock
224
+ getGitPackageInLocalCache name gitPackage
225
+ liftAff $ AVar .put unit `traverse_` lock
230
226
RegistryVersion v -> do
231
227
-- if the version comes from the registry then we have a longer list of things to do
232
228
let versionString = Registry.Version .print v
You can’t perform that action at this time.
0 commit comments