Skip to content

Commit 49cd054

Browse files
authored
Update owo-colors (updated) (#1708)
This PR is based on #1611 and uses @purplesyringa's work mostly unmodified. In addition, I have updated the minimum set of crates to get to a working and consistent state, esp. w.r.t. cargo-deny. I didn't update *all* the dependencies, in order to do "one thing at a time" and to avoid creating an undebuggable mess.
2 parents baf457e + 8633ec6 commit 49cd054

File tree

7 files changed

+80
-115
lines changed

7 files changed

+80
-115
lines changed

Cargo.lock

Lines changed: 58 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ members = ["xtask"]
2929
[dependencies]
3030
is-terminal = "0.4.2"
3131
clap = { version = "4.1.4", features = ["derive"] }
32-
color-eyre = { version = "0.6.2", default-features = false, features = ["track-caller"] }
32+
color-eyre = { version = "0.6.5", default-features = false, features = ["track-caller"] }
3333
eyre = "0.6.8"
3434
thiserror = "1.0.38"
3535
home = "0.5.4"
@@ -46,7 +46,7 @@ signal-hook = { version = "0.3.15" }
4646
directories = "4.0.1"
4747
walkdir = { version = "2.3.2", optional = true }
4848
tempfile = "3.3.0"
49-
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
49+
owo-colors = { version = "4.0", features = ["supports-colors"] }
5050
semver = "1.0.16"
5151
is_ci = "1.1.1"
5252

deny.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ targets = [
99

1010
[advisories]
1111
version = 2
12-
ignore = [
13-
# FIXME: remove this if/when clap changes to is-terminal, atty is
14-
# patched, or we migrated to an MSRV of 1.66.0.
15-
"RUSTSEC-2021-0145",
16-
"RUSTSEC-2024-0375"
17-
]
1812

1913
[bans]
2014
multiple-versions = "deny"

src/bin/commands/containers.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ use std::io;
33
use clap::{Args, Subcommand};
44
use cross::docker::ImagePlatform;
55
use cross::rustc::{QualifiedToolchain, Toolchain};
6-
use cross::shell::{MessageInfo, Stream};
6+
use cross::shell::MessageInfo;
77
use cross::{docker, CommandExt, TargetTriple};
8+
use is_terminal::IsTerminal;
89

910
#[derive(Args, Debug)]
1011
pub struct ListVolumes {
@@ -327,7 +328,8 @@ pub fn create_persistent_volume(
327328
docker.arg("--rm");
328329
docker.args(["-v", &format!("{}:{}", volume_id, mount_prefix)]);
329330
docker.arg("-d");
330-
let is_tty = io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty();
331+
let is_tty =
332+
io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal();
331333
if is_tty {
332334
docker.arg("-t");
333335
}

src/docker/local.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ use super::shared::*;
77
use crate::errors::Result;
88
use crate::extensions::CommandExt;
99
use crate::file::{PathExt, ToUtf8};
10-
use crate::shell::{MessageInfo, Stream};
10+
use crate::shell::MessageInfo;
1111
use eyre::Context;
12+
use is_terminal::IsTerminal;
1213

1314
// NOTE: host path must be absolute
1415
fn mount(
@@ -136,7 +137,7 @@ pub(crate) fn run(
136137
]);
137138
}
138139

139-
if io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty() {
140+
if io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal() {
140141
docker.arg("-t");
141142
}
142143

src/docker/remote.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::process::{Command, ExitStatus};
55
use std::{env, fs, time};
66

77
use eyre::Context;
8+
use is_terminal::IsTerminal;
89

910
use super::engine::Engine;
1011
use super::shared::*;
@@ -13,7 +14,7 @@ use crate::errors::Result;
1314
use crate::extensions::CommandExt;
1415
use crate::file::{self, PathExt, ToUtf8};
1516
use crate::rustc::{self, QualifiedToolchain, VersionMetaExt};
16-
use crate::shell::{MessageInfo, Stream};
17+
use crate::shell::MessageInfo;
1718
use crate::temp;
1819
use crate::TargetTriple;
1920

@@ -774,7 +775,8 @@ pub(crate) fn run(
774775
}
775776

776777
docker.arg("-d");
777-
let is_tty = io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty();
778+
let is_tty =
779+
io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal();
778780
if is_tty {
779781
docker.arg("-t");
780782
}

0 commit comments

Comments
 (0)