Closed j-xella closed 1 week ago
@devyn thoughts on this?
Yeah, someone else reported this a while ago. I didn't really intend for tee
to be used on non-iterables, and it will probably require a separate code path to do this, but I think it makes sense.
Describe the bug
tee
converts everything to lists. So:[ 1 2 3 ] | tee {}
- output is the same as input, as already a list[ { a:b } ] | tee {}
- output is the same as input, as table is a listBUT !!!
1 | tee {}
- input is a number, output is a list, with the number as the single element{ a:b } | tee {}
- input is a record, output is a table of one rowThis happens not only to the output of tee, but also to the input that is passed to the closure
How to reproduce
Try the above examples, see the output.
Expected behavior
tee
should not tamper with the data passed to it, but forward it as is.Or is this an expected behaviour? Help doesn't mention it...
Screenshots
No response
Configuration
Additional context
No response