Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Jul 20, 2024
1 parent de09c29 commit 8130d8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/cli/tests/install_node_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8130d8b

Please sign in to comment.