Fixed command piping
This commit is contained in:
parent
915be2cb99
commit
bca11ddfd2
1 changed files with 3 additions and 2 deletions
|
|
@ -211,13 +211,14 @@ export function Terminal({ startPath, input, setTitle, close: exit, active }) {
|
||||||
const pipes = value.split(" | ");
|
const pipes = value.split(" | ");
|
||||||
|
|
||||||
let output = null;
|
let output = null;
|
||||||
pipes.forEach((pipe) => {
|
pipes.forEach((pipe, index) => {
|
||||||
|
removeFromArray(pipe[index - 1], pipes);
|
||||||
|
|
||||||
if (output instanceof Stream)
|
if (output instanceof Stream)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Output from the previous command gets added as an argument for the next command
|
// Output from the previous command gets added as an argument for the next command
|
||||||
output = handleInput(output ? `${pipe} ${output}` : pipe);
|
output = handleInput(output ? `${pipe} ${output}` : pipe);
|
||||||
removeFromArray(pipe, pipes);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (output) {
|
if (output) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue