summaryrefslogtreecommitdiff
path: root/cli/cache
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/cache
parent9e31f9452e0b91816b9114f17e7aaa5c226b9337 (diff)
chore(cli): remove atty crate (#20275)
Removes a crate with an outstanding vulnerability.
Diffstat (limited to 'cli/cache')
-rw-r--r--cli/cache/cache_db.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/cache/cache_db.rs b/cli/cache/cache_db.rs
index 9b591f58a..b6b4d074e 100644
--- a/cli/cache/cache_db.rs
+++ b/cli/cache/cache_db.rs
@@ -9,6 +9,7 @@ use deno_runtime::deno_webstorage::rusqlite::Connection;
use deno_runtime::deno_webstorage::rusqlite::OptionalExtension;
use deno_runtime::deno_webstorage::rusqlite::Params;
use once_cell::sync::OnceCell;
+use std::io::IsTerminal;
use std::path::PathBuf;
use std::sync::Arc;
@@ -261,7 +262,7 @@ impl CacheDB {
};
// Failed, try deleting it
- let is_tty = atty::is(atty::Stream::Stderr);
+ let is_tty = std::io::stderr().is_terminal();
log::log!(
if is_tty { log::Level::Warn } else { log::Level::Trace },
"Could not initialize cache database '{}', deleting and retrying... ({err:?})",