The JS facade sends an args array: craft-bridge.js:545-548 posts {id, command, cwd, args} for spawn. But SpawnParams in bridge_shell.zig:266 declares only id/command/cwd — with ignore_unknown_fields, args is parsed and dropped. So craft.shell.spawn('git', ['status']) runs git with no arguments and no error.
Two clean fixes, pick one:
- Add
args: ?[]const []const u8toSpawnParamsand append them to the argv, or - If spawn is meant to take a full command string (it currently goes through
sh -c), dropargsfrom the JS signature and the.d.tsso the API stops advertising a parameter it ignores.
The first matches what the JS types promise. Flagged during a bridge-surface audit.
🤖 Generated with Claude Code