From c272d26ae84ddf8ce1aa0456fbecedff102a64b0 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Fri, 25 Aug 2023 07:43:07 -0600 Subject: chore(cli): remove atty crate (#20275) Removes a crate with an outstanding vulnerability. --- cli/tools/upgrade.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/tools') diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index bef4538b3..c0fbb73ce 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -23,6 +23,7 @@ use once_cell::sync::Lazy; use std::borrow::Cow; use std::env; use std::fs; +use std::io::IsTerminal; use std::ops::Sub; use std::path::Path; use std::path::PathBuf; @@ -210,7 +211,7 @@ pub fn check_for_upgrades( // Print a message if an update is available if let Some(upgrade_version) = update_checker.should_prompt() { - if log::log_enabled!(log::Level::Info) && atty::is(atty::Stream::Stderr) { + if log::log_enabled!(log::Level::Info) && std::io::stderr().is_terminal() { if version::is_canary() { eprint!( "{} ", -- cgit v1.2.3