summaryrefslogtreecommitdiff
path: root/cli/util/draw_thread.rs
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-08-25 07:43:07 -0600
committerGitHub <noreply@github.com>2023-08-25 07:43:07 -0600
commitc272d26ae84ddf8ce1aa0456fbecedff102a64b0 (patch)
tree286eb981bd742ad0fd94b1aae08dfbc24b36b854 /cli/util/draw_thread.rs
parent9e31f9452e0b91816b9114f17e7aaa5c226b9337 (diff)
chore(cli): remove atty crate (#20275)
Removes a crate with an outstanding vulnerability.
Diffstat (limited to 'cli/util/draw_thread.rs')
-rw-r--r--cli/util/draw_thread.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/util/draw_thread.rs b/cli/util/draw_thread.rs
index 832c7f74b..352ead3b0 100644
--- a/cli/util/draw_thread.rs
+++ b/cli/util/draw_thread.rs
@@ -5,6 +5,7 @@ use deno_core::parking_lot::Mutex;
use deno_core::unsync::spawn_blocking;
use deno_runtime::ops::tty::ConsoleSize;
use once_cell::sync::Lazy;
+use std::io::IsTerminal;
use std::sync::Arc;
use std::time::Duration;
@@ -70,7 +71,7 @@ static INTERNAL_STATE: Lazy<Arc<Mutex<InternalState>>> = Lazy::new(|| {
});
static IS_TTY_WITH_CONSOLE_SIZE: Lazy<bool> = Lazy::new(|| {
- atty::is(atty::Stream::Stderr)
+ std::io::stderr().is_terminal()
&& console_size()
.map(|s| s.cols > 0 && s.rows > 0)
.unwrap_or(false)