summaryrefslogtreecommitdiff
path: root/Shell/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Shell/AST.cpp')
-rw-r--r--Shell/AST.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Shell/AST.cpp b/Shell/AST.cpp
index be8d600d69..07864b734e 100644
--- a/Shell/AST.cpp
+++ b/Shell/AST.cpp
@@ -1142,6 +1142,14 @@ RefPtr<Value> Pipe::run(RefPtr<Shell> shell)
last_in_left.should_wait = false;
last_in_left.is_pipe_source = true;
+ if (first_in_right.pipeline) {
+ last_in_left.pipeline = first_in_right.pipeline;
+ } else {
+ auto pipeline = adopt(*new Pipeline);
+ last_in_left.pipeline = pipeline;
+ first_in_right.pipeline = pipeline;
+ }
+
Vector<Command> commands;
commands.append(left);
commands.append(last_in_left);