Skip to content

Commit

Permalink
remove unmaintained atty crate from dependencies
Browse files Browse the repository at this point in the history
There's a replacement in std that requires 1.70 which is old enough for us.
  • Loading branch information
wfraser committed Jan 3, 2025
1 parent a223883 commit c141442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ readme = "README.md"

[package.metadata]
# Keep this at least 1 year old.
# (or not... 1.75 is required for "-> impl Trait" sadly)
# 1.75 is required for "-> impl Trait"
msrv = "1.75.0" # Dec 28, 2023

[dependencies]
async-lock = "3.3.0"
atty = "0.2.14"
base64 = "0.22"
bytes = "1.6.0"
log = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/oauth2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//! [OAuth types summary]: https://developers.dropbox.com/oauth-guide#summary
use std::env;
use std::io::{self, Write};
use std::io::{self, IsTerminal, Write};
use std::sync::Arc;
use async_lock::RwLock;
use base64::Engine;
Expand Down Expand Up @@ -664,7 +664,7 @@ pub fn get_auth_from_env_or_prompt() -> Authorization {
}
}

if !atty::is(atty::Stream::Stdin) {
if !io::stdin().is_terminal() {
panic!("DBX_CLIENT_ID and/or DBX_OAUTH not set, and stdin not a TTY; cannot authorize");
}

Expand Down

0 comments on commit c141442

Please sign in to comment.