Skip to content

Commit 502a649

Browse files
committed
fix the l10n failed test
Tell Cargo to track UUCORE_TARGET_UTIL env var changes. Without this, Cargo doesn't know the environment variable affects the build output, so it reuses cached builds even when the variable changes.
1 parent b444074 commit 502a649

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/uucore/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ fn project_root() -> Result<std::path::PathBuf, Box<dyn std::error::Error>> {
7272
fn detect_target_utility() -> Option<String> {
7373
use std::fs;
7474

75+
// Tell Cargo to rerun if this environment variable changes
76+
println!("cargo:rerun-if-env-changed=UUCORE_TARGET_UTIL");
77+
7578
// First check if an explicit environment variable was set
7679
if let Ok(target_util) = env::var("UUCORE_TARGET_UTIL") {
7780
if !target_util.is_empty() {

0 commit comments

Comments
 (0)