ITADN

Progressive iteration over a piped process

#1211OpenMaddyGuthridge 创建于 2025-10-26
M
MaddyGuthridgecommented
While trying to work around #1210, I have encountered another issue. It appears that I am unable to progressively iterate over the stdout of a piped process. ```js const process = execa`cat temp.txt` .pipe(execa`tr \\r \\n`); for await (const line of process) { console.log(line); // TypeError: line of execa`cat temp.txt`.pipe is not a function. (In 'line of execa`cat temp.txt`.pipe(execa`tr \\r \\n`)', 'line of execa`cat temp.txt`.pipe' is undefined) } ``` Is this possible? If so, how can I do so? If not, can it be added please :)
3 条评论