Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ num_cpus = "1.0"
time = { version = "0.3", features = ["macros", "parsing"] }
memchr = "2" # TODO: Use pear instead.
binascii = "0.1"
atty = "0.2"
is-terminal = "0.4.3"
ref-cast = "1.0"
atomic = "0.5"
parking_lot = "0.12"
Expand Down
3 changes: 2 additions & 1 deletion core/lib/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ pub(crate) fn init(config: &crate::Config) {

// Set Rocket-logger specific settings only if Rocket's logger is set.
if ROCKET_LOGGER_SET.load(Ordering::Acquire) {
use is_terminal::IsTerminal;
// Rocket logs to stdout, so disable coloring if it's not a TTY.
if !atty::is(atty::Stream::Stdout) {
if !std::io::stdout().is_terminal() {
Paint::disable();
}

Expand Down