Fixed command piping

This commit is contained in:
Prozilla 2024-05-04 14:01:01 +02:00
parent 915be2cb99
commit bca11ddfd2
No known key found for this signature in database
GPG key ID: 5858DFE71CAF31EE

View file

@ -211,13 +211,14 @@ export function Terminal({ startPath, input, setTitle, close: exit, active }) {
const pipes = value.split(" | ");
let output = null;
pipes.forEach((pipe) => {
pipes.forEach((pipe, index) => {
removeFromArray(pipe[index - 1], pipes);
if (output instanceof Stream)
return;
// Output from the previous command gets added as an argument for the next command
output = handleInput(output ? `${pipe} ${output}` : pipe);
removeFromArray(pipe, pipes);
});
if (output) {