From d2d763608ffb37c4754cd18e1dfaa27c4daea0bd Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 21 Dec 2025 20:30:07 +0000 Subject: [PATCH 1/2] Fix eldritchv2 Windows build errors in libsys - Add `uuid` to `eldritch-libsys` dev-dependencies to fix unresolved import in tests. - Fix `test_exec_input` in `exec_impl.rs` to correctly define `input` variable for Windows target and use `args` properly. From e2c9221953ec4a24ad9b17242546d26c92223a7e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 21 Dec 2025 21:01:55 +0000 Subject: [PATCH 2/2] Fix eldritchv2 Windows build errors in libsys - Add `uuid` to `eldritch-libsys` dev-dependencies to fix unresolved import in tests. - Fix `test_exec_input` in `exec_impl.rs` to correctly define `input` variable for Windows target and use `args` properly. --- .../lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml | 1 + .../stdlib/eldritch-libsys/src/std/exec_impl.rs | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml b/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml index d8e7e2029..fe1340bec 100644 --- a/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml +++ b/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml @@ -37,6 +37,7 @@ stdlib = ["dep:sysinfo", "dep:whoami", "dep:local-ip-address", "dep:hex"] fake_bindings = [] [dev-dependencies] +uuid = { version = "1.0", features = ["v4"] } tempfile = { workspace = true } [build-dependencies] diff --git a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs index 60dc8e372..dd94f3a49 100644 --- a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs +++ b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs @@ -211,14 +211,15 @@ mod tests { #[test] fn test_exec_input() -> Result<()> { #[cfg(target_os = "windows")] - let (cmd, args) = ( + let (cmd, args, input) = ( "cmd.exe".to_string(), - vec!["/C".to_string(), "echo".to_string(), "hello".to_string()], + vec!["/C".to_string(), "findstr".to_string(), "^".to_string()], + "hello".to_string(), ); #[cfg(not(target_os = "windows"))] - let (cmd, input) = ("cat".to_string(), "hello".to_string()); + let (cmd, args, input) = ("cat".to_string(), Vec::new(), "hello".to_string()); - let res = exec(cmd, Vec::new(), Some(false), None, Some(input))?; + let res = exec(cmd, args, Some(false), None, Some(input))?; assert_eq!(res.get("status").unwrap(), &Value::Int(0)); let stdout = res.get("stdout").unwrap();