From 3595834b535bec29ff6c484f5c637e221f5ec99a Mon Sep 17 00:00:00 2001 From: qwjyh Date: Tue, 4 Feb 2025 03:57:46 +0900 Subject: [PATCH] debug(CI): change workdir & add same config setup --- tests/cli.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/cli.rs b/tests/cli.rs index 15794f1..18829c5 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -43,32 +43,37 @@ mod integrated_test { #[test] fn git_init() -> Result<()> { + let temp_dir = assert_fs::TempDir::new()?; + setup_gitconfig(temp_dir.path())?; let p = std::process::Command::new("git") .args(["init"]) + .current_dir(temp_dir.path()) .spawn() .context("git spawn")? .wait() .context("running git failed")? .to_string(); - eprintln!("{}", p); + eprintln!("git init\n{}", p); let p = std::process::Command::new("git") .args(["config", "--list"]) + .current_dir(temp_dir.path()) .spawn() .context("git spawn")? .wait() .context("running git failed")? .to_string(); - eprintln!("{}", p); + eprintln!("git config\n{}", p); let p = std::process::Command::new("git") .args(["config", "--list", "--local"]) + .current_dir(temp_dir.path()) .spawn() .context("git spawn")? .wait() .context("running git failed")? .to_string(); - eprintln!("{}", p); + eprintln!("git config --local\n{}", p); Ok(()) }