Skip to content
Open
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
21 changes: 0 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ diesel_derives = { workspace = true }
chrono = "0.4.43"
envconfig = { workspace = true }
Inflector = "0.11.3"
atty = "0.2"
reqwest = { version = "0.12.23", features = ["json", "stream", "multipart"] }
ethabi = "17.2"
hex = "0.4.3"
Expand Down
1 change: 0 additions & 1 deletion graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ pub mod prelude {
pub use ::anyhow;
pub use alloy;
pub use anyhow::{anyhow, Context as _, Error};
pub use atty;
pub use chrono;
pub use diesel;
pub use envconfig;
Expand Down
9 changes: 6 additions & 3 deletions graph/src/log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ macro_rules! impl_slog_value {
};
}

use atty;
use slog::*;
use slog_async;
use slog_envlogger;
use slog_term::*;
use std::{fmt, io, result};
use std::{
fmt,
io::{self, IsTerminal},
result,
};

use crate::prelude::ENV_VARS;

Expand All @@ -36,7 +39,7 @@ pub fn logger(show_debug: bool) -> Logger {
}

pub fn logger_with_levels(show_debug: bool, levels: Option<&str>) -> Logger {
let use_color = atty::is(atty::Stream::Stdout);
let use_color = io::stdout().is_terminal();
let decorator = slog_term::TermDecorator::new().build();
let drain = CustomFormat::new(decorator, use_color).fuse();
let drain = slog_envlogger::LogBuilder::new(drain)
Expand Down
9 changes: 6 additions & 3 deletions node/src/manager/color.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
use std::{io, sync::Mutex};
use std::{
io::{self, IsTerminal as _},
sync::Mutex,
};
use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor};

use graph::prelude::{atty, lazy_static};
use graph::prelude::lazy_static;

use super::CmdResult;

Expand All @@ -27,7 +30,7 @@ impl Terminal {
"always" => ColorChoice::Always,
"ansi" => ColorChoice::AlwaysAnsi,
"auto" => {
if atty::is(atty::Stream::Stdout) {
if io::stdout().is_terminal() {
ColorChoice::Auto
} else {
ColorChoice::Never
Expand Down