mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-28 00:35:32 +08:00
fix(test): resolve HOME env race condition in parallel tests
- Use get_home_dir() instead of dirs::home_dir() in get_opencode_dir() and get_openclaw_dir() to respect CC_SWITCH_TEST_HOME override - Add CC_SWITCH_TEST_HOME to all TempHome implementations - Add #[serial] to all with_test_home tests to share serialization with other env-mutating tests - Remove --test-threads=1 workaround from CI
This commit is contained in:
@@ -37,9 +37,9 @@ pub fn get_opencode_dir() -> PathBuf {
|
||||
return override_dir;
|
||||
}
|
||||
|
||||
dirs::home_dir()
|
||||
.map(|h| h.join(".config").join("opencode"))
|
||||
.unwrap_or_else(|| PathBuf::from(".config").join("opencode"))
|
||||
crate::config::get_home_dir()
|
||||
.join(".config")
|
||||
.join("opencode")
|
||||
}
|
||||
|
||||
pub fn get_opencode_config_path() -> PathBuf {
|
||||
|
||||
Reference in New Issue
Block a user