Files
claw-code/rust/crates/rusty-claude-cli/tests/support/mod.rs
T
Dror Meirovichandclawdbot 407a6c62f8 fix(windows): fix native runtime compatibility and enable workspace t… (#3378)
* fix(windows): fix native runtime compatibility and enable workspace tests

Fix shell discovery, hook quoting, native path handling and OAuth
randomness on Windows, make the test fixtures portable, and run the
full workspace test suite in the Windows CI job.

* test(plugins): make lifecycle fixtures Windows-compatible

* fix(windows): address workspace test failures

---------

Co-authored-by: clawdbot <clawdbot@ultraworkers.dev>
2026-11-08 19:45:52 +00:00

28 lines
767 B
Rust

use std::ffi::OsString;
// Keep credentials, proxy variables and user configuration out of subprocess
// tests, but preserve the operating-system environment needed to load DLLs,
// initialize networking and find the installed test interpreters on Windows.
pub fn process_environment() -> Vec<(&'static str, OsString)> {
#[cfg(windows)]
{
[
"PATH",
"SYSTEMROOT",
"WINDIR",
"SYSTEMDRIVE",
"COMSPEC",
"PATHEXT",
"TEMP",
"TMP",
]
.into_iter()
.filter_map(|name| std::env::var_os(name).map(|value| (name, value)))
.collect()
}
#[cfg(not(windows))]
{
vec![("PATH", OsString::from("/usr/bin:/bin"))]
}
}