stabilize ecc2 cwd-mutating tests

This commit is contained in:
Affaan Mustafa
2026-05-15 14:02:49 -04:00
committed by Affaan Mustafa
parent c2c54e7c0b
commit 6b8a49a6ee
2 changed files with 43 additions and 19 deletions

View File

@@ -12923,8 +12923,7 @@ diff --git a/src/lib.rs b/src/lib.rs
let repo_root = tempdir.join("repo");
init_git_repo(&repo_root)?;
let original_dir = std::env::current_dir()?;
std::env::set_current_dir(&repo_root)?;
let cwd_guard = crate::test_support::CurrentDirGuard::enter(&repo_root)?;
let mut cfg = build_config(&tempdir);
cfg.orchestration_templates = BTreeMap::from([(
@@ -13000,7 +12999,7 @@ diff --git a/src/lib.rs b/src/lib.rs
])
);
std::env::set_current_dir(original_dir)?;
drop(cwd_guard);
let _ = std::fs::remove_dir_all(&tempdir);
Ok(())
}