Skip to content

Commit a628505

Browse files
committed
Issue #20 Read stderr before stdout to avoid hanging processes
1 parent 99f9d7d commit a628505

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/Command.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@ public function execute()
315315

316316
if (is_resource($process)) {
317317

318-
$this->_stdOut = stream_get_contents($pipes[1]);
318+
// Issue #20: Read stderr before stdout to avoid hanging processes
319319
$this->_stdErr = stream_get_contents($pipes[2]);
320+
$this->_stdOut = stream_get_contents($pipes[1]);
320321
fclose($pipes[1]);
321322
fclose($pipes[2]);
322323

0 commit comments

Comments
 (0)