test: the servers two_user starts get a Windows environment (P11c)
two_user.rs started its flagged servers with env_clear plus a Unix PATH
and HOME, no SystemRoot: on Windows Winsock cannot start without it, so
the --http door failed to bind (the server says so on stderr and serves
its pipes only, which is why "ready" still came). The tests now use the
harness's clean_env, as do evidence.rs's extract and the viewer's
command_line test. main (a8ce2e7d) merged in.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS8WZziDnyxunC23MUxrLp
This commit is contained in:
1 parent
af0c3e95ec
commit
4a2b327513
3 files changed
+27
-22
No files matched your search
@@ -10,6 +10,13 @@ use std::process::Command;
|
||||
fn viewer(home: &std::path::Path) -> Command {
|
||||
let mut c = Command::new(env!("CARGO_BIN_EXE_ledger-gui"));
|
||||
c.env_clear().env("PATH", "/usr/bin:/bin").env("HOME", home);
|
||||
// A Windows program started with no environment at all can't load.
|
||||
#[cfg(windows)]
|
||||
for name in ["SystemRoot", "windir"] {
|
||||
if let Some(value) = std::env::var_os(name) {
|
||||
c.env(name, value);
|
||||
}
|
||||
}
|
||||
c
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user