diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 0ae374ce6e2ce..343306f3e1742 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -241,6 +241,10 @@ public function downloadApp(string $appId, bool $allowUnstable = false): void { // Download the release $tempFile = $this->tempManager->getTemporaryFile('.tar.gz'); + if ($tempFile === false) { + throw new \RuntimeException('Could not create temporary file for downloading app archive.'); + } + $timeout = $this->isCLI ? 0 : 120; $client = $this->clientService->newClient(); $client->get($app['releases'][0]['download'], ['sink' => $tempFile, 'timeout' => $timeout]);