Skip to content

Commit

Permalink
Merge branch 'fix/display_stderr_on_publish_error' of github.com:Wayl…
Browse files Browse the repository at this point in the history
…andAce/pact-php into WaylandAce-fix/display_stderr_on_publish_error
  • Loading branch information
YOU54F committed Apr 28, 2023
2 parents 4cbc3db + 16c3b6e commit a4b5a41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/PhpPact/Standalone/Broker/Broker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 1 addition & 6 deletions src/PhpPact/Standalone/ProviderVerifier/VerifierProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit a4b5a41

Please sign in to comment.