Also look up 7zz on linux/macOS, fixes #9951
parent
b602b19f6d
commit
be58b36a35
|
@ -177,12 +177,18 @@ EOT
|
|||
|
||||
$finder = new ExecutableFinder;
|
||||
$hasSystemUnzip = (bool) $finder->find('unzip');
|
||||
$hasSystem7zip = (bool) $finder->find('7z', null, array('C:\Program Files\7-Zip'));
|
||||
$bin7zip = '';
|
||||
if ($hasSystem7zip = (bool) $finder->find('7z', null, array('C:\Program Files\7-Zip'))) {
|
||||
$bin7zip = '7z';
|
||||
}
|
||||
if (!Platform::isWindows() && !$hasSystem7zip && $hasSystem7zip = (bool) $finder->find('7zz')) {
|
||||
$bin7zip = '7zz';
|
||||
}
|
||||
|
||||
$io->write(
|
||||
'zip: ' . (extension_loaded('zip') ? '<comment>extension present</comment>' : '<comment>extension not loaded</comment>')
|
||||
. ', ' . ($hasSystemUnzip ? '<comment>unzip present</comment>' : '<comment>unzip not available</comment>')
|
||||
. ', ' . ($hasSystem7zip ? '<comment>7-Zip present</comment>' : '<comment>7-Zip not available</comment>')
|
||||
. ', ' . ($hasSystem7zip ? '<comment>7-Zip present ('.$bin7zip.')</comment>' : '<comment>7-Zip not available</comment>')
|
||||
);
|
||||
|
||||
return $this->exitCode;
|
||||
|
|
|
@ -49,6 +49,9 @@ class ZipDownloader extends ArchiveDownloader
|
|||
if (!Platform::isWindows() && ($cmd = $finder->find('7z'))) { // 7z linux/macOS support is only used if unzip is not present
|
||||
self::$unzipCommands[] = array('7z', ProcessExecutor::escape($cmd).' x -bb0 -y %s -o%s');
|
||||
}
|
||||
if (!Platform::isWindows() && ($cmd = $finder->find('7zz'))) { // 7zz linux/macOS support is only used if unzip is not present
|
||||
self::$unzipCommands[] = array('7zz', ProcessExecutor::escape($cmd).' x -bb0 -y %s -o%s');
|
||||
}
|
||||
}
|
||||
|
||||
if (null === self::$hasZipArchive) {
|
||||
|
|
Loading…
Reference in New Issue