File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -112,16 +112,20 @@ private static function checkFinishedProcess(Process $finishedProcess): void
112112 private static function transformPipeline (array $ pipeline ): array
113113 {
114114 $ transformedPipeline = [];
115+ $ shellCommandLine = null ;
115116 foreach ($ pipeline as $ filter ) {
116117 if ($ filter instanceof self) {
117- $ transformedPipeline [] = new Process ([
118+ $ shellCommandLine = ( $ shellCommandLine === null ? '' : "{ $ shellCommandLine } | " ) . ( new Process ([
118119 $ filter ->command ,
119120 ...($ filter ->options ?? []),
120- ]);
121+ ]))-> getCommandLine () ;
121122 } else {
122123 throw new \BadMethodCallException ('$pipeline contains unsupported filter ' );
123124 }
124125 }
126+ if ($ shellCommandLine !== null ) {
127+ $ transformedPipeline [] = Process::fromShellCommandline ($ shellCommandLine );
128+ }
125129 return $ transformedPipeline ;
126130 }
127131}
You can’t perform that action at this time.
0 commit comments