Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify --global-package-db when calling ghc-pkg recache and check #133

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cabal-store-check/src/CabalStoreCheck/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,15 @@ checkConsistency tracer opts = do
void $ runProcessCheck tracer storeDir ghcPkg
[ "recache"
, packageDbFlag
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
]

-- and run vanilla ghc-pkg check on the db
void $ runProcessOutput tracer storeDir ghcPkg
[ "check"
, packageDbFlag
, "--simple-output"
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
]

-------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions cabal-store-gc/src/CabalStoreGC/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ doCollect tracer opts = do
void $ runProcessCheck tracer storeDir ghcPkg
[ "recache"
, packageDbFlag
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
]

-- and run vanilla ghc-pkg check on the db
void $ runProcessOutput tracer storeDir ghcPkg
[ "check"
, packageDbFlag
, "--simple-output"
, "--global-package-db=" <> toFilePath (ghcGlobalDb ghcInfo)
]

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