quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.79k stars 310 forks source link

quarto embedded pandoc stdout redirected to stderr #2699

Open castedo opened 1 year ago

castedo commented 1 year ago

Bug description

The stdout of the embedded pandoc is getting redirected to stderr. For example:

quarto pandoc --version 2> /dev/null

outputs nothing (2> redirects stderr) but

pandoc --version 2> /dev/null

does output the version message.

This holds for other outputs of pandoc to stdout.

I am not directly affected by this, but I can imagine some piping scenarios where this could be pretty annoying.

VERSION:

$ quarto --version
1.1.251
$ cat /etc/os-release 
NAME="Fedora Linux"
VERSION="36 (Container Image)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Container Image)"

Checklist

cscheid commented 1 year ago

Thanks for the report! We're aware of this issue and know how to fix it (I actually have a fix in a private branch ready to go). The main issue is that the regression surface of the fix is quite large, because we use stdout/stderr redirection from downstream binaries in a large number of places in our code. We'll revisit soon after we start work on 1.3.