Просмотр исходного кода

Added notice about need of zip extension

Serge Smertin 12 лет назад
Родитель
Сommit
6cec5b0399
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/Composer/Repository/ArtifactRepository.php

+ 8 - 0
src/Composer/Repository/ArtifactRepository.php

@@ -36,6 +36,14 @@ class ArtifactRepository extends ArrayRepository
     protected function initialize()
     {
         parent::initialize();
+
+        if (!extension_loaded('zip')) {
+            $msg = 'In order to use <comment>artifact</comment> repository, ' .
+                'you need to have <comment>zip</comment> extension enabled';
+            $this->io->write($msg);
+            return;
+        }
+
         $this->scanDirectory($this->lookup);
     }