diff options
Diffstat (limited to 'runtime/colors.rs')
-rw-r--r-- | runtime/colors.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/colors.rs b/runtime/colors.rs index a9ad12e8c..fe5a3dcbe 100644 --- a/runtime/colors.rs +++ b/runtime/colors.rs @@ -1,8 +1,8 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use atty; use once_cell::sync::Lazy; use std::fmt; +use std::io::IsTerminal; use std::io::Write; use termcolor::Ansi; use termcolor::Color::Ansi256; @@ -25,7 +25,7 @@ use termcolor::ColorChoice; static NO_COLOR: Lazy<bool> = Lazy::new(|| std::env::var_os("NO_COLOR").is_some()); -static IS_TTY: Lazy<bool> = Lazy::new(|| atty::is(atty::Stream::Stdout)); +static IS_TTY: Lazy<bool> = Lazy::new(|| std::io::stdout().is_terminal()); pub fn is_tty() -> bool { *IS_TTY |