Skip to content

Commit c141442

Browse files
committed
remove unmaintained atty crate from dependencies
There's a replacement in std that requires 1.70 which is old enough for us.
1 parent a223883 commit c141442

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ readme = "README.md"
1212

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

1818
[dependencies]
1919
async-lock = "3.3.0"
20-
atty = "0.2.14"
2120
base64 = "0.22"
2221
bytes = "1.6.0"
2322
log = "0.4"

src/oauth2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//! [OAuth types summary]: https://developers.dropbox.com/oauth-guide#summary
1414
1515
use std::env;
16-
use std::io::{self, Write};
16+
use std::io::{self, IsTerminal, Write};
1717
use std::sync::Arc;
1818
use async_lock::RwLock;
1919
use base64::Engine;
@@ -664,7 +664,7 @@ pub fn get_auth_from_env_or_prompt() -> Authorization {
664664
}
665665
}
666666

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

0 commit comments

Comments
 (0)