Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace unmaintained atty crate with std::io::IsTerminal #318

Merged
merged 1 commit into from
Jul 18, 2023
Merged
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
1 change: 0 additions & 1 deletion 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 binaries/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ serde_yaml = "0.9.11"
webbrowser = "0.8.3"
serde_json = "1.0.86"
termcolor = "1.1.3"
atty = "0.2.14"
uuid = { version = "1.2.1", features = ["v4", "serde"] }
inquire = "0.5.2"
communication-layer-request-reply = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions binaries/cli/src/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use crate::connect_to_coordinator;
use communication_layer_request_reply::TcpRequestReplyConnection;
use dora_core::topics::{ControlRequest, ControlRequestReply};
use eyre::{bail, Context};
use std::io::Write;
use std::io::{IsTerminal, Write};
use termcolor::{Color, ColorChoice, ColorSpec, WriteColor};

pub fn check_environment() -> eyre::Result<()> {
let mut error_occured = false;

let color_choice = if atty::is(atty::Stream::Stdout) {
let color_choice = if std::io::stdout().is_terminal() {
ColorChoice::Auto
} else {
ColorChoice::Never
Expand Down
Loading