@@ -70,6 +70,8 @@ class Installer {
7070 private $ apps = null ;
7171 /** @var bool|null - for caching the result of the ready status */
7272 private $ isInstanceReadyForUpdates = null ;
73+ /** @var bool */
74+ private $ isCLI ;
7375
7476 /**
7577 * @param AppFetcher $appFetcher
@@ -78,16 +80,20 @@ class Installer {
7880 * @param ILogger $logger
7981 * @param IConfig $config
8082 */
81- public function __construct (AppFetcher $ appFetcher ,
82- IClientService $ clientService ,
83- ITempManager $ tempManager ,
84- ILogger $ logger ,
85- IConfig $ config ) {
83+ public function __construct (
84+ AppFetcher $ appFetcher ,
85+ IClientService $ clientService ,
86+ ITempManager $ tempManager ,
87+ ILogger $ logger ,
88+ IConfig $ config ,
89+ bool $ isCLI
90+ ) {
8691 $ this ->appFetcher = $ appFetcher ;
8792 $ this ->clientService = $ clientService ;
8893 $ this ->tempManager = $ tempManager ;
8994 $ this ->logger = $ logger ;
9095 $ this ->config = $ config ;
96+ $ this ->isCLI = $ isCLI ;
9197 }
9298
9399 /**
@@ -270,8 +276,9 @@ public function downloadApp($appId) {
270276
271277 // Download the release
272278 $ tempFile = $ this ->tempManager ->getTemporaryFile ('.tar.gz ' );
279+ $ timeout = $ this ->isCLI ? 0 : 120 ;
273280 $ client = $ this ->clientService ->newClient ();
274- $ client ->get ($ app ['releases ' ][0 ]['download ' ], ['save_to ' => $ tempFile , 'timeout ' => 120 ]);
281+ $ client ->get ($ app ['releases ' ][0 ]['download ' ], ['save_to ' => $ tempFile , 'timeout ' => $ timeout ]);
275282
276283 // Check if the signature actually matches the downloaded content
277284 $ certificate = openssl_get_publickey ($ app ['certificate ' ]);
0 commit comments