Cabal: new-run doesn't suppress its own stdout when being invoked as part of a pipe

Created on 27 Sep 2018  路  4Comments  路  Source: haskell/cabal

Invoking cabal new-run target -- something > data is kinda broken, because I get cabal information messages at the front.

nix-local-build

Most helpful comment

Honestly, I think that some of that information should be going to stderr instead.

All 4 comments

@hasufell, have you tried

cabal new-run -v0 target -- something > data

Yes, didn't change anything

Edit: oh wait, I did -v 0 and not -v0 (the syntax btw is cabal new-run target -v0 -- something > data)

I still think this should be automatic. A program can detect whether it's being invoked as part of a "pipe". Most command line programs do that (e.g. git).

Honestly, I think that some of that information should be going to stderr instead.

Related: #4789.

Was this page helpful?
0 / 5 - 0 ratings