Module process/command
process/command
High-level child-process spawning with builder-style configuration.
Wraps std/sys/process with a fluent API for constructing argv, capturing
stdout/stderr through pipes, and waiting for the child to exit.
Example
{ Command } :: import "std/process/command";
{ Exception, AnyError } :: import "std/error";
main :: (fn(io : Io, exn : Exception) -> unit)({
cmd := Command.new(`echo`);
cmd.arg(`hello`);
cmd.arg(`world`);
out := io.await(cmd.output(io), { io, exn });
assert(out.status.success(), "echo should succeed");
});