Skip to content

Commit

Permalink
Merge pull request #244 from minvws/exit-code
Browse files Browse the repository at this point in the history
Do not exit with 0 on errors
  • Loading branch information
annejan authored Jul 17, 2024
2 parents d6fb3bd + ba4d1d1 commit f38e16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Service/ZammadService.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function export(
"* Error while dumping ticket " . $ticket->getID() . ' : ' . $e->getMessage()
);
$this->output->writeln("Export incomplete!");
exit;
exit(1);
}

if ($this->verbose) {
Expand Down Expand Up @@ -181,7 +181,7 @@ protected function getTickets(int $page, string $search = ''): array
$resp = $this->client->getLastResponse();
if (!$resp || $resp->getStatusCode() >= 400) {
$this->output->writeln("Error while fetching ticket. Maybe an incorrect or missing authorization key?");
return [];
exit(1);
}

return $result;
Expand Down

0 comments on commit f38e16b

Please sign in to comment.