swap tests to prevent conflicting error-messages
parent
07867724d0
commit
5bae1913ab
|
@ -56,6 +56,14 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
self::$hasZipArchive = class_exists('ZipArchive');
|
self::$hasZipArchive = class_exists('ZipArchive');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!self::$hasZipArchive && !self::$hasSystemUnzip) {
|
||||||
|
// php.ini path is added to the error message to help users find the correct file
|
||||||
|
$iniMessage = IniHelper::getMessage();
|
||||||
|
$error = "The zip extension and unzip command are both missing, skipping.\n" . $iniMessage;
|
||||||
|
|
||||||
|
throw new \RuntimeException($error);
|
||||||
|
}
|
||||||
|
|
||||||
if (null === self::$isWindows) {
|
if (null === self::$isWindows) {
|
||||||
self::$isWindows = Platform::isWindows();
|
self::$isWindows = Platform::isWindows();
|
||||||
|
|
||||||
|
@ -65,14 +73,6 @@ class ZipDownloader extends ArchiveDownloader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!self::$hasZipArchive && !self::$hasSystemUnzip) {
|
|
||||||
// php.ini path is added to the error message to help users find the correct file
|
|
||||||
$iniMessage = IniHelper::getMessage();
|
|
||||||
$error = "The zip extension and unzip command are both missing, skipping.\n" . $iniMessage;
|
|
||||||
|
|
||||||
throw new \RuntimeException($error);
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::download($package, $path, $output);
|
return parent::download($package, $path, $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue