mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
fix: check of xz
This commit is contained in:
@@ -28,6 +28,7 @@ class LinuxToolCheckList
|
|||||||
'git', 'autoconf', 'automake',
|
'git', 'autoconf', 'automake',
|
||||||
'tar', 'unzip', 'gzip',
|
'tar', 'unzip', 'gzip',
|
||||||
'bzip2', 'cmake', 'patch',
|
'bzip2', 'cmake', 'patch',
|
||||||
|
'xz',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
@@ -87,7 +88,7 @@ class LinuxToolCheckList
|
|||||||
logger()->warning('Current user is not root, using sudo for running command');
|
logger()->warning('Current user is not root, using sudo for running command');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', $missing));
|
shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', str_replace('xz', 'xz-utils', $missing)));
|
||||||
} catch (RuntimeException) {
|
} catch (RuntimeException) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user