Repository navigation
Commit c27bbd0
fix(runner): surface a failing tool's stderr under stdout-only filtering
`uv run rtk pytest` produced no output at all when pytest was missing from the
venv: exit 1, a single newline on stdout, nothing on stderr. A test run that
prints nothing and reports no error reads as a quiet pass, leaving the exit code
as the only signal.
The trigger is uv, but the defect is in the runner. Filters that compress stdout
pass RunOptions::stdout_only, which keeps stderr out of the filter input — and
run_captured_filter only ever emitted stderr inside its skip_filter_on_failure
branch. Callers that pair stdout_only with early_exit_on_failure (ls, tree) hit
that branch and print stderr; callers that don't (pytest, ruff, prettier, go
test, golangci-lint, phpunit, phpstan, pint, rubocop) captured stderr and
dropped it on the floor.
Standalone `rtk pytest` looks fine only because python is absent there: the spawn
fails outright and the anyhow error prints. Under `uv run` the venv supplies
python, so rtk falls back to `python -m pytest`, the spawn succeeds, and the
child's "No module named pytest" goes to the stderr that was being discarded.
Emit stderr when the child fails. Only on failure: on a successful run stderr is
the incidental noise RTK exists to suppress, and filtered stdout already carries
the result.
Fixes rtk-ai#30261 parent 1018b8b commit c27bbd0
2 files changed
Lines changed: 78 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
0 commit comments