Skip to content

Commit 2d101ed

Browse files
committed
Specify --global-package-db when calling ghc-pkg recache and check
1 parent 1eb4198 commit 2d101ed

File tree

2 files changed

+4
-0
lines changed
  • cabal-store-check/src/CabalStoreCheck
  • cabal-store-gc/src/CabalStoreGC

2 files changed

+4
-0
lines changed

cabal-store-check/src/CabalStoreCheck/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,15 @@ checkConsistency tracer opts = do
195195
void $ runProcessCheck tracer storeDir ghcPkg
196196
[ "recache"
197197
, packageDbFlag
198+
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
198199
]
199200

200201
-- and run vanilla ghc-pkg check on the db
201202
void $ runProcessOutput tracer storeDir ghcPkg
202203
[ "check"
203204
, packageDbFlag
204205
, "--simple-output"
206+
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
205207
]
206208

207209
-------------------------------------------------------------------------------

cabal-store-gc/src/CabalStoreGC/Main.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,15 @@ doCollect tracer opts = do
149149
void $ runProcessCheck tracer storeDir ghcPkg
150150
[ "recache"
151151
, packageDbFlag
152+
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
152153
]
153154

154155
-- and run vanilla ghc-pkg check on the db
155156
void $ runProcessOutput tracer storeDir ghcPkg
156157
[ "check"
157158
, packageDbFlag
158159
, "--simple-output"
160+
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
159161
]
160162

161163
flippedFoldlM :: (Foldable f, Monad m) => f a -> b -> (b -> a -> m b) -> m b

0 commit comments

Comments
 (0)