Skip to content
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
126 changes: 58 additions & 68 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ members = ["xtask"]
[dependencies]
is-terminal = "0.4.2"
clap = { version = "4.1.4", features = ["derive"] }
color-eyre = { version = "0.6.2", default-features = false, features = ["track-caller"] }
color-eyre = { version = "0.6.5", default-features = false, features = ["track-caller"] }
eyre = "0.6.8"
thiserror = "1.0.38"
home = "0.5.4"
Expand All @@ -46,7 +46,7 @@ signal-hook = { version = "0.3.15" }
directories = "4.0.1"
walkdir = { version = "2.3.2", optional = true }
tempfile = "3.3.0"
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
owo-colors = { version = "4.0", features = ["supports-colors"] }
semver = "1.0.16"
is_ci = "1.1.1"

Expand Down
6 changes: 0 additions & 6 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ targets = [

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

[bans]
multiple-versions = "deny"
Expand Down
6 changes: 4 additions & 2 deletions src/bin/commands/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ use std::io;
use clap::{Args, Subcommand};
use cross::docker::ImagePlatform;
use cross::rustc::{QualifiedToolchain, Toolchain};
use cross::shell::{MessageInfo, Stream};
use cross::shell::MessageInfo;
use cross::{docker, CommandExt, TargetTriple};
use is_terminal::IsTerminal;

#[derive(Args, Debug)]
pub struct ListVolumes {
Expand Down Expand Up @@ -327,7 +328,8 @@ pub fn create_persistent_volume(
docker.arg("--rm");
docker.args(["-v", &format!("{}:{}", volume_id, mount_prefix)]);
docker.arg("-d");
let is_tty = io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty();
let is_tty =
io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal();
if is_tty {
docker.arg("-t");
}
Expand Down
5 changes: 3 additions & 2 deletions src/docker/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ use super::shared::*;
use crate::errors::Result;
use crate::extensions::CommandExt;
use crate::file::{PathExt, ToUtf8};
use crate::shell::{MessageInfo, Stream};
use crate::shell::MessageInfo;
use eyre::Context;
use is_terminal::IsTerminal;

// NOTE: host path must be absolute
fn mount(
Expand Down Expand Up @@ -136,7 +137,7 @@ pub(crate) fn run(
]);
}

if io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty() {
if io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal() {
docker.arg("-t");
}

Expand Down
6 changes: 4 additions & 2 deletions src/docker/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::process::{Command, ExitStatus};
use std::{env, fs, time};

use eyre::Context;
use is_terminal::IsTerminal;

use super::engine::Engine;
use super::shared::*;
Expand All @@ -13,7 +14,7 @@ use crate::errors::Result;
use crate::extensions::CommandExt;
use crate::file::{self, PathExt, ToUtf8};
use crate::rustc::{self, QualifiedToolchain, VersionMetaExt};
use crate::shell::{MessageInfo, Stream};
use crate::shell::MessageInfo;
use crate::temp;
use crate::TargetTriple;

Expand Down Expand Up @@ -774,7 +775,8 @@ pub(crate) fn run(
}

docker.arg("-d");
let is_tty = io::Stdin::is_atty() && io::Stdout::is_atty() && io::Stderr::is_atty();
let is_tty =
io::stdin().is_terminal() && io::stdout().is_terminal() && io::stderr().is_terminal();
if is_tty {
docker.arg("-t");
}
Expand Down
Loading
Loading