From 8130d8b784c0c27decf588d26e535f9b57047996 Mon Sep 17 00:00:00 2001 From: ityuany <519495771@qq.com> Date: Sun, 21 Jul 2024 01:41:53 +0800 Subject: [PATCH] debug --- crates/cli/tests/install_node_test.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/cli/tests/install_node_test.rs b/crates/cli/tests/install_node_test.rs index 7ac4dfd2..49b7c5bc 100644 --- a/crates/cli/tests/install_node_test.rs +++ b/crates/cli/tests/install_node_test.rs @@ -6,6 +6,11 @@ use rexpect::spawn; use uuid::Uuid; fn create_temp_dir() -> PathBuf { + let current_dir = env::current_dir()?; + let target_debug_dir = current_dir.join("target").join("debug"); + let current_path = env::var("PATH").unwrap_or_default(); + let new_path = format!("{}:{}", target_debug_dir.display(), current_path); + env::set_var("PATH", new_path); let temp_dir = env::temp_dir(); let unique_dir = temp_dir.join(Uuid::new_v4().to_string()); fs::create_dir(&unique_dir).expect("Failed to create temp directory");