Repository navigation
Conversation
930875d to
766e013
Compare
`&&` binds tighter than `||`, so the length guard only applied to lines matching `"..."` while `⸨`/`⸩` matches were unconditionally dropped. Wrapping the disjunction in parentheses applies the `line.len() < 10` check to all three progress-indicator patterns. Closes rtk-ai#2654
766e013 to
242d013
Compare
|
Rebased on current develop; the bug is still there verbatim at On whether this costs compression: it can't. npm only draws the This touches |
Summary
Closes #2654
filter_npm_outputdropped any line containing⸨or⸩regardless of its length, because&&binds tighter than||:so the
len() < 10guard only applied to the...arm. The threecontainscalls are now hoisted into a namedis_progress_glyph, and the length guard applies to the whole condition. (The parenthesised one-liner is 102 characters and rustfmt won't take it; the comment spells out the precedence so it isn't tidied back.)Does this cost compression? No: npm only draws the
⸨…⸩bar when stderr is a TTY, and rtk always captures through a pipe. Checked with npm 10.8.2: a pipednpm installemits no⸨/⸩and no CR, so that arm is unreachable under rtk either way. This makes the code say what it meant.Tests
test_progress_indicator_preserves_long_linesfails on develop's condition (Long line with progress chars should be preserved, got: ok)cargo fmt --all -- --check,cargo clippy --all-targets(0 warnings),cargo test --all(all pass)