Merge branch '1.6'
commit
837ad7c14e
|
@ -56,10 +56,6 @@ class ZipDownloader extends ArchiveDownloader
|
|||
self::$hasZipArchive = class_exists('ZipArchive');
|
||||
}
|
||||
|
||||
if (null === self::$isWindows) {
|
||||
self::$isWindows = Platform::isWindows();
|
||||
}
|
||||
|
||||
if (!self::$hasZipArchive && !self::$hasSystemUnzip) {
|
||||
// php.ini path is added to the error message to help users find the correct file
|
||||
$iniMessage = IniHelper::getMessage();
|
||||
|
@ -68,6 +64,15 @@ class ZipDownloader extends ArchiveDownloader
|
|||
throw new \RuntimeException($error);
|
||||
}
|
||||
|
||||
if (null === self::$isWindows) {
|
||||
self::$isWindows = Platform::isWindows();
|
||||
|
||||
if (!self::$isWindows && !self::$hasSystemUnzip) {
|
||||
$this->io->writeError("<warn>As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.</warn>");
|
||||
$this->io->writeError("<warn>This may cause invalid reports of corrupted archives. Installing 'unzip' may remediate them.</warn>");
|
||||
}
|
||||
}
|
||||
|
||||
return parent::download($package, $path, $output);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue