direnv exec
has started writing ANSI escape sequences to stderr when stderr isn't a terminal
#953
Labels
direnv exec
has started writing ANSI escape sequences to stderr when stderr isn't a terminal
#953
Describe the bug
Hi there - It seems like a recent version of direnv has started making a classic mistake that many programs do, and is unconditionally writing ANSI escape sequences :)
To Reproduce
$ direnv exec . true 2>x.txt
Then open x.txt in a text editor and see that it starts with
\x1B[mdirenv: loading
Expected behavior
When writing to either of stdout/stderr, if they aren't a terminal/TTY then ANSI escape sequences shouldn't be written. So the file x.txt in the example should simply start with:
direnv: loading
Environment
The text was updated successfully, but these errors were encountered: