diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-14 17:32:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-14 17:32:09 -0400 |
commit | e39b94f3aa09bc77280b98caebb9ae472f8f6c5a (patch) | |
tree | 8bfaec53de64cd6dcfccf2045f4231265b091fdd /cli/worker.rs | |
parent | 1e2b0a22196ab2a17ceae855293fdcd5a2596161 (diff) |
fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)
This also fixes a bug where Deno would output to stderr with colours
when piped and stdout was not piped.
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index a05dff4b2..a49929ca5 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -601,7 +601,8 @@ impl CliMainWorkerFactory { locale: deno_core::v8::icu::get_language_tag(), location: shared.options.location.clone(), no_color: !colors::use_color(), - is_tty: deno_terminal::is_stdout_tty(), + is_stdout_tty: deno_terminal::is_stdout_tty(), + is_stderr_tty: deno_terminal::is_stderr_tty(), unstable: shared.options.unstable, unstable_features, user_agent: version::get_user_agent().to_string(), @@ -811,7 +812,8 @@ fn create_web_worker_callback( locale: deno_core::v8::icu::get_language_tag(), location: Some(args.main_module.clone()), no_color: !colors::use_color(), - is_tty: deno_terminal::is_stdout_tty(), + is_stdout_tty: deno_terminal::is_stdout_tty(), + is_stderr_tty: deno_terminal::is_stderr_tty(), unstable: shared.options.unstable, unstable_features, user_agent: version::get_user_agent().to_string(), |