Skip to content

Commit e940535

Browse files
committed
Make ghc-pkg calls less noisy
1 parent c435a3c commit e940535

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Other enhancements:
1414
Bug fixes:
1515

1616
* `~/.stack/config.yaml` and `stack.yaml` terminating by newline
17+
* The previous released caused a regression where some `stderr` from the
18+
`ghc-pkg` command showed up in the terminal. This output is now silenced.
1719

1820

1921
## v1.7.1

src/Stack/GhcPkg.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ ghcPkg wc pkgDbs args = do
7171
go
7272
Right _ -> return eres
7373
where
74-
go = fmap (fmap BL.toStrict)
74+
go = fmap (fmap (BL.toStrict . fst))
7575
$ tryAny
76-
$ proc (ghcPkgExeName wc) args' readProcessStdout_
76+
$ proc (ghcPkgExeName wc) args' readProcess_
7777
args' = packageDbFlags pkgDbs ++ args
7878

7979
-- | Create a package database in the given directory, if it doesn't exist.
@@ -102,7 +102,7 @@ createDatabase wc db = do
102102
ensureDir (parent db)
103103
return ["init", toFilePath db]
104104
void $ proc (ghcPkgExeName wc) args $ \pc ->
105-
readProcessStdout_ pc `onException`
105+
readProcess_ pc `onException`
106106
logError ("Unable to create package database at " <> fromString (toFilePath db))
107107

108108
-- | Get the name to use for "ghc-pkg", given the compiler version.

0 commit comments

Comments
 (0)