Skip to content

Commit 3259b63

Browse files
authored
Add check for temp file
Signed-off-by: Artur Weigandt <[email protected]>
1 parent e88bc54 commit 3259b63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/Installer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ public function downloadApp(string $appId, bool $allowUnstable = false): void {
241241

242242
// Download the release
243243
$tempFile = $this->tempManager->getTemporaryFile('.tar.gz');
244+
if ($tempFile === false) {
245+
throw new \RuntimeException('Could not create temporary file for downloading app archive.');
246+
}
247+
244248
$timeout = $this->isCLI ? 0 : 120;
245249
$client = $this->clientService->newClient();
246250
$client->get($app['releases'][0]['download'], ['sink' => $tempFile, 'timeout' => $timeout]);

0 commit comments

Comments
 (0)