Skip to content

Commit 6fffc89

Browse files
committed
Remove CARGO_TERM_COLOR rather than set it to "never"
1 parent 98bd222 commit 6fffc89

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

cargo-dylint/tests/ci.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use regex::Regex;
88
use semver::{Op, Version};
99
use similar_asserts::SimpleDiff;
1010
use std::{
11-
env::{set_current_dir, set_var, var},
11+
env::{remove_var, set_current_dir, var},
1212
ffi::OsStr,
1313
fmt::Write as _,
1414
fs::{read_dir, read_to_string, write},
@@ -26,7 +26,7 @@ static DESCRIPTION_REGEX: LazyLock<Regex> =
2626
fn initialize() {
2727
set_current_dir("..").unwrap();
2828
unsafe {
29-
set_var(env::CARGO_TERM_COLOR, "never");
29+
remove_var(env::CARGO_TERM_COLOR);
3030
}
3131
}
3232

cargo-dylint/tests/integration/depinfo_dylint_libs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use assert_cmd::prelude::*;
22
use dylint_internal::env;
33
use predicates::prelude::*;
4-
use std::{env::set_var, process::Command};
4+
use std::{env::remove_var, process::Command};
55

66
#[ctor::ctor]
77
fn initialize() {
88
unsafe {
9-
set_var(env::CARGO_TERM_COLOR, "never");
9+
remove_var(env::CARGO_TERM_COLOR);
1010
}
1111
}
1212

cargo-dylint/tests/integration/library_packages.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use assert_cmd::prelude::*;
22
use dylint_internal::{CommandExt, env, packaging::isolate};
33
use predicates::prelude::*;
4-
use std::{env::set_var, fs::OpenOptions, io::Write};
4+
use std::{env::remove_var, fs::OpenOptions, io::Write};
55
use tempfile::tempdir;
66

77
// smoelius: "Separate lints into categories" commit
@@ -10,7 +10,7 @@ const REV: &str = "402fc24351c60a3c474e786fd76aa66aa8638d55";
1010
#[ctor::ctor]
1111
fn initialize() {
1212
unsafe {
13-
set_var(env::CARGO_TERM_COLOR, "never");
13+
remove_var(env::CARGO_TERM_COLOR);
1414
}
1515
}
1616

dylint-link/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ linker = "false"
377377

378378
std::process::Command::new("cargo")
379379
.env(env::CARGO_HOME, cargo_home.path())
380-
.env(env::CARGO_TERM_COLOR, "never")
380+
.env_remove(env::CARGO_TERM_COLOR)
381381
.current_dir(&package)
382382
.arg("build")
383383
.assert()

utils/testing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ fn rustc_flags(metadata: &Metadata, package: &Package, target: &Target) -> Resul
322322
// say "Building `package` examples".
323323
dylint_internal::cargo::build(&format!("`{}` examples", package.name))
324324
.build()
325-
.envs([(env::CARGO_TERM_COLOR, "never")])
325+
.env_remove(env::CARGO_TERM_COLOR)
326326
.args([
327327
"--manifest-path",
328328
package.manifest_path.as_ref(),

0 commit comments

Comments
 (0)