fix: System.run treated any stderr output as a fatal error - #84
Merged
Conversation
Fourth bug in the unity-activate#111 chain. docker run writes "Unable to find image '...' locally" to stderr as pure informational output when auto-pulling an uncached image, then proceeds to pull it and succeed with exit code 0. System.run threw on that anyway, discarding an otherwise successful run, because it treated *any* non-empty stderr as failure regardless of exit code. Now checks the exit code instead. stderr content is still surfaced in the thrown error message when a command genuinely fails.
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fourth bug in the same chain as #79/#81/#82, found by re-running unity-activate#111's CI against v0.1.5.
The bug
System.runrejected on any non-empty stderr, regardless of exit code:docker runwritesUnable to find image '...' locallyto stderr as pure status output when it needs to auto-pull an image — then pulls it and exits 0. The log showed exactly this:Digest: .../Status: Downloaded newer image for ...(a successful pull) followed immediately by[ERROR] Error: Unable to find image ... locally— the run had already succeeded by the time the error was thrown.The fix
Check the exit code instead. stderr content is still included in the thrown error message when a command genuinely fails (non-zero exit).
How I found it
v0.1.5 (with #81/#82) got unity-activate#111 past engine detection, target-platform validation, and the broken image tag — this is what showed up next.
unityci/editor:ubuntu-2019.2.17f1-base-3pulled successfully (visible in the log) right before the run was thrown as failed anyway.Testing
system.test.ts: succeeds when stderr has output but exit code is 0; throws on non-zero exit even with empty stderr; throws with stderr content included when a command genuinely fails.bun run test— 151 pass, 3 skip, 0 fail.🤖 Generated with Claude Code