ReviewOS

also looking at this

craft-native/craft

fix(shell): actually pass spawn its arguments

#77
Merged glennmichael123 wants to merge fix/shell-spawn-args into main
4 files +284 -11
packages/zig/build.zigmodified+14-0
Changes to packages/zig/build.zig
@@ -732,6 +732,18 @@ pub fn build(b: *std.Build) void {
732732 }),
733733 });
734734
735 // The shell bridge's argv construction: what a `spawn` actually runs.
736 // Untested until now, which is how it shipped parsing an `args` array and
737 // throwing it away.
738 const bridge_shell_tests = b.addTest(.{
739 .root_module = b.createModule(.{
740 .root_source_file = b.path("src/bridge_shell.zig"),
741 .target = target,
742 .optimize = optimize,
743 }),
744 });
745 bridge_shell_tests.root_module.link_libc = true;
746
735747 // The conformance test: what craft declares, against what it dispatches.
736748 const capability_conformance_tests = b.addTest(.{
737749 .root_module = b.createModule(.{
@@ -1103,6 +1115,7 @@ pub fn build(b: *std.Build) void {
11031115 const run_local_tls_tests = b.addRunArtifact(local_tls_tests);
11041116 const run_menu_roles_tests = b.addRunArtifact(menu_roles_tests);
11051117 const run_capabilities_tests = b.addRunArtifact(capabilities_tests);
1118 const run_bridge_shell_tests = b.addRunArtifact(bridge_shell_tests);
11061119 const run_window_lifecycle_tests = b.addRunArtifact(window_lifecycle_tests);
11071120 const run_window_registry_tests = b.addRunArtifact(window_registry_tests);
11081121 const run_external_link_tests = b.addRunArtifact(external_link_tests);
@@ -1224,6 +1237,7 @@ pub fn build(b: *std.Build) void {
12241237 test_step.dependOn(&run_local_tls_tests.step);
12251238 test_step.dependOn(&run_menu_roles_tests.step);
12261239 test_step.dependOn(&run_capabilities_tests.step);
1240 test_step.dependOn(&run_bridge_shell_tests.step);
12271241 test_step.dependOn(&run_window_lifecycle_tests.step);
12281242 test_step.dependOn(&run_window_registry_tests.step);
12291243 test_step.dependOn(&run_external_link_tests.step);