From cb9c179bc649801b361263e52117a4048b717b07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Tue, 21 Nov 2023 15:19:08 +0100 Subject: [PATCH] Migrated code from symfony/process to react/child-process --- src/Adapter/Composer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Adapter/Composer.php b/src/Adapter/Composer.php index f58ad39e..400a22c4 100644 --- a/src/Adapter/Composer.php +++ b/src/Adapter/Composer.php @@ -26,6 +26,8 @@ public function log($level, $message, array $context = []): void private function execute(Process $process, float $timeout = 300): void { + $process->start(); + $process->stdout->on('data', function ($chunk) { $this->logger->debug($chunk); }); @@ -39,7 +41,6 @@ private function execute(Process $process, float $timeout = 300): void $deferred->resolve(); }); - $process->start(); $this->logger->notice(sprintf('Starting process "%s".', $process->getCommand())); await(timeout($deferred->promise(), $timeout));