diff options
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r-- | lib/private/Installer.php | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php index 790bec0ddd5..b3919f22d03 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -70,6 +70,8 @@ class Installer { private $apps = null; /** @var bool|null - for caching the result of the ready status */ private $isInstanceReadyForUpdates = null; + /** @var bool */ + private $isCLI; /** * @param AppFetcher $appFetcher @@ -78,16 +80,20 @@ class Installer { * @param ILogger $logger * @param IConfig $config */ - public function __construct(AppFetcher $appFetcher, - IClientService $clientService, - ITempManager $tempManager, - ILogger $logger, - IConfig $config) { + public function __construct( + AppFetcher $appFetcher, + IClientService $clientService, + ITempManager $tempManager, + ILogger $logger, + IConfig $config, + bool $isCLI + ) { $this->appFetcher = $appFetcher; $this->clientService = $clientService; $this->tempManager = $tempManager; $this->logger = $logger; $this->config = $config; + $this->isCLI = $isCLI; } /** @@ -270,8 +276,9 @@ class Installer { // Download the release $tempFile = $this->tempManager->getTemporaryFile('.tar.gz'); + $timeout = $this->isCLI ? 0 : 120; $client = $this->clientService->newClient(); - $client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => 120]); + $client->get($app['releases'][0]['download'], ['save_to' => $tempFile, 'timeout' => $timeout]); // Check if the signature actually matches the downloaded content $certificate = openssl_get_publickey($app['certificate']); |