mirror of
https://github.com/instructkr/claw-code.git
synced 2026-11-17 00:00:00 +08:00
* 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>
28 lines
767 B
Rust
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"))]
|
|
}
|
|
}
|