Skip to content

Commit 88b4c2f

Browse files
authored
Merge pull request #6249 from juhp/list-stdout
list: output to stdout
2 parents b5a350a + 8bfc2d3 commit 88b4c2f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Major changes:
1010

1111
Behavior changes:
1212

13+
* `stack list` outputs to standard output rather than to standard error.
14+
1315
Other enhancements:
1416

1517
Bug fixes:

src/Stack/List.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Stack.List
88
) where
99

1010
import Pantry ( loadSnapshot )
11+
import qualified RIO.ByteString.Lazy as Lazy
1112
import qualified RIO.Map as Map
1213
import RIO.Process ( HasProcessContext )
1314
import Stack.Config ( makeConcreteResolver )
@@ -56,7 +57,7 @@ listPackages mSnapshot input = do
5657
case errs1 ++ errs2 of
5758
[] -> pure ()
5859
errs -> prettyThrowM $ CouldNotParsePackageSelectors errs
59-
mapM_ (prettyInfo . fromString . packageIdentifierString) locs
60+
mapM_ (Lazy.putStrLn . fromString . packageIdentifierString) locs
6061
where
6162
toLoc | Just snapshot <- mSnapshot = toLocSnapshot snapshot
6263
| otherwise = toLocNoSnapshot

0 commit comments

Comments
 (0)