diff --git a/gcli/tests/common/env.rs b/gcli/tests/common/env.rs index 5c8efa1ce73..813b713530a 100644 --- a/gcli/tests/common/env.rs +++ b/gcli/tests/common/env.rs @@ -21,7 +21,7 @@ use std::sync::LazyLock; /// target path from the root workspace const TARGET: &str = "target"; -const WASM_TARGET: &str = "wasms"; +const WASM_DIR: &str = "wasms"; static ROOT: LazyLock = LazyLock::new(|| env!("CARGO_MANIFEST_DIR").to_owned() + "/../"); pub static PROFILE: &str = if cfg!(debug_assertions) { @@ -31,11 +31,11 @@ pub static PROFILE: &str = if cfg!(debug_assertions) { }; fn bin_path(name: &str, profile: &str, wasm: bool) -> String { - let root = ROOT; + let root = ROOT.clone(); if wasm { - format!("{TARGET}/{profile}/{WASM_TARGET}/{name}") + format!("{root}{TARGET}/{profile}/{WASM_DIR}/{name}") } else { - format!("{TARGET}/{profile}/{name}") + format!("{root}{TARGET}/{profile}/{name}") } }