Skip to content

Commit

Permalink
Clean up the temporary options file when browser was called successfully
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardenexal authored and freekmurze committed Jul 15, 2024
1 parent 0e2d256 commit 8d574c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Browsershot.php
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,10 @@ protected function callBrowser(array $command): string
$this->chromiumResult = new ChromiumResult(json_decode($rawOutput, true));

if ($process->isSuccessful()) {
return $this->chromiumResult?->getResult();
$result = $this->chromiumResult?->getResult();

$this->cleanupTemporaryOptionsFile();
return $result;
}

$this->cleanupTemporaryOptionsFile();
Expand Down

0 comments on commit 8d574c7

Please sign in to comment.