Bug
tri ui command fails with error:
swift build failed: FileNotFound
Root Cause
In src/tri/tri_commands.zig, the uiBuild function calls std.process.Child.run but does NOT pass the current environment to the subprocess:
zig const result = std.process.Child.run(.{ .allocator = allocator, .argv = &.{ "swift", "build" }, .cwd = "apps/queen", .max_output_bytes = 256 * 1024, // ❌ Missing: .env = ... or .has_env = true })
Expected Behavior
When tri ui is run, it should:
- Kill old Trinity.app processes
- Run
swift build in apps/queen directory
- Copy binary to Trinity.app bundle
- Open Trinity.app
Actual Behavior
Step 2 fails with FileNotFound because the subprocess doesn't inherit PATH from the parent process.
Workaround
Launch Queen UI directly:
bash ./.build/arm64-apple-macosx/debug/trinity
Fix Required
Add environment inheritance to uiBuild function. In Zig 0.15.x, the correct API needs to be determined (tested: .has_env, .env = std.process.Child.Env.from_current_process, absolute paths - none worked).
Priority: P2 (medium) - workaround exists
Bug
tri ui command fails with error:
swift build failed: FileNotFoundRoot Cause
In
src/tri/tri_commands.zig, theuiBuildfunction callsstd.process.Child.runbut does NOT pass the current environment to the subprocess:zig const result = std.process.Child.run(.{ .allocator = allocator, .argv = &.{ "swift", "build" }, .cwd = "apps/queen", .max_output_bytes = 256 * 1024, // ❌ Missing: .env = ... or .has_env = true })Expected Behavior
When
tri uiis run, it should:swift buildin apps/queen directoryActual Behavior
Step 2 fails with
FileNotFoundbecause the subprocess doesn't inherit PATH from the parent process.Workaround
Launch Queen UI directly:
bash ./.build/arm64-apple-macosx/debug/trinityFix Required
Add environment inheritance to
uiBuildfunction. In Zig 0.15.x, the correct API needs to be determined (tested:.has_env,.env = std.process.Child.Env.from_current_process, absolute paths - none worked).Priority: P2 (medium) - workaround exists