From 3259b63783d809fe79db59ad48f69e3fdcd2bc22 Mon Sep 17 00:00:00 2001 From: Artur Weigandt Date: Sun, 10 Aug 2025 17:29:15 +0200 Subject: [PATCH] Add check for temp file Signed-off-by: Artur Weigandt --- lib/private/Installer.php | 4 ++++ 1 file changed, 4 insertions(+) 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]);