mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-13 04:59:03 +00:00
Replace deprecated 'isatty' with 'atty'.
This commit is contained in:
parent
f81bdd90fc
commit
2cb35e2544
@ -34,7 +34,7 @@ time = "0.1"
|
|||||||
memchr = "2" # TODO: Use pear instead.
|
memchr = "2" # TODO: Use pear instead.
|
||||||
base64 = "0.10"
|
base64 = "0.10"
|
||||||
pear = "0.1"
|
pear = "0.1"
|
||||||
isatty = "0.1"
|
atty = "0.2"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
yansi = "0.5"
|
yansi = "0.5"
|
||||||
|
@ -111,7 +111,7 @@ extern crate state;
|
|||||||
extern crate time;
|
extern crate time;
|
||||||
extern crate memchr;
|
extern crate memchr;
|
||||||
extern crate base64;
|
extern crate base64;
|
||||||
extern crate isatty;
|
extern crate atty;
|
||||||
|
|
||||||
#[cfg(test)] #[macro_use] extern crate lazy_static;
|
#[cfg(test)] #[macro_use] extern crate lazy_static;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ crate fn try_init(level: LoggingLevel, verbose: bool) -> bool {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !::isatty::stdout_isatty()
|
if !::atty::is(::atty::Stream::Stdout)
|
||||||
|| (cfg!(windows) && !Paint::enable_windows_ascii())
|
|| (cfg!(windows) && !Paint::enable_windows_ascii())
|
||||||
|| env::var_os(COLORS_ENV).map(|v| v == "0" || v == "off").unwrap_or(false)
|
|| env::var_os(COLORS_ENV).map(|v| v == "0" || v == "off").unwrap_or(false)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user