diff --git a/src/PhpPact/Standalone/Broker/Broker.php b/src/PhpPact/Standalone/Broker/Broker.php index 36ccf6cd..75742c28 100644 --- a/src/PhpPact/Standalone/Broker/Broker.php +++ b/src/PhpPact/Standalone/Broker/Broker.php @@ -245,13 +245,13 @@ public function publish(): void $this->getArguments() ) ); - $runner->runBlocking(); - if ($runner->getExitCode() !== 0) { - $this->logger->error($runner->getStderr()); + try { + $runner->runBlocking(); + } finally { + $this->logger->info('out > ' . $runner->getOutput()); + $this->logger->error('err > ' . $runner->getStderr()); } - - $this->logger->debug($runner->getOutput()); } public function testWebhook() diff --git a/src/PhpPact/Standalone/ProviderVerifier/VerifierProcess.php b/src/PhpPact/Standalone/ProviderVerifier/VerifierProcess.php index 712a54f4..447b5189 100644 --- a/src/PhpPact/Standalone/ProviderVerifier/VerifierProcess.php +++ b/src/PhpPact/Standalone/ProviderVerifier/VerifierProcess.php @@ -61,14 +61,9 @@ public function run(array $arguments, $processTimeout, $processIdleTimeout) try { $processRunner->runBlocking(); - - $logger->info('out > ' . $processRunner->getOutput()); - $logger->error('err > ' . $processRunner->getStderr()); - } catch (\Exception $e) { + } finally { $logger->info('out > ' . $processRunner->getOutput()); $logger->error('err > ' . $processRunner->getStderr()); - - throw $e; } }