mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
The tee verb passed the same record pointer both to its file-output handler (which writes asynchronously on another goroutine, and whose buffering formats like pprint/json can hold records until close) and downstream in the verb chain, where subsequent verbs mutate records in place. Downstream mutations could therefore leak into the tee'd output: mlr tee -p cat then cat -n then nothing <<EOF a=1,b=2 a=3,b=4 a=5,b=6 EOF emitted "n=3,a=5,b=6" for the last tee'd record, and with pprint/json tee formats every record picked up downstream fields. Fix: give the file-writer its own deep copy of the record. Same fix applied to the split verb when -v (emit downstream) is used, which shared records with downstream the same way. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| auxents | ||
| bifs | ||
| cli | ||
| climain | ||
| colorizer | ||
| dkvpx | ||
| dsl | ||
| entrypoint | ||
| go-csv | ||
| input | ||
| lib | ||
| mlrval | ||
| output | ||
| parsing | ||
| pbnjay-strptime | ||
| platform | ||
| runtime | ||
| scan | ||
| stream | ||
| terminals | ||
| transformers | ||
| types | ||
| version | ||
| README.md | ||
Please see ../../README-dev.md for an overview; please see each subdirectory for details about it.