<#6152 Do not color output when redirecting to a f...
# meltano-repo-activity
g
#6152 Do not color output when redirecting to a file Issue created by astrojuanlu
Trying to redirect stderr to a file produces all the bash special characters for coloring. Maybe the coloring should only be enabled if the output is a tty?
(From #3322 (comment)) For example:
Copy code
$ meltano invoke tap-postgres 2>&1 | tee output.txt | head -n1
2022-06-10T15:14:02.964019Z [info     ] Environment 'dev' is active
$ cat -A output.txt | head -n1
^[[2m2022-06-10T15:14:02.964019Z^[[0m [^[[32m^[[1minfo     ^[[0m] ^[[1mEnvironment 'dev' is active^[[0m$
meltano/meltano