summaryrefslogtreecommitdiff
path: root/cli/tools/upgrade.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/tools/upgrade.rs
parent9e31f9452e0b91816b9114f17e7aaa5c226b9337 (diff)
chore(cli): remove atty crate (#20275)
Removes a crate with an outstanding vulnerability.
Diffstat (limited to 'cli/tools/upgrade.rs')
-rw-r--r--cli/tools/upgrade.rs3
1 files changed, 2 insertions, 1 deletions
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!(
"{} ",