mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
fix perl-IPC-Cmd check so it doesn't try installing it every time
This commit is contained in:
@@ -19,6 +19,9 @@ trait UnixSystemUtilTrait
|
|||||||
if (!$paths) {
|
if (!$paths) {
|
||||||
$paths = explode(PATH_SEPARATOR, getenv('PATH'));
|
$paths = explode(PATH_SEPARATOR, getenv('PATH'));
|
||||||
}
|
}
|
||||||
|
if (str_starts_with($name, '/')) {
|
||||||
|
return file_exists($name) ? $name : null;
|
||||||
|
}
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
if (file_exists($path . DIRECTORY_SEPARATOR . $name)) {
|
if (file_exists($path . DIRECTORY_SEPARATOR . $name)) {
|
||||||
return $path . DIRECTORY_SEPARATOR . $name;
|
return $path . DIRECTORY_SEPARATOR . $name;
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ class LinuxToolCheckList
|
|||||||
'base-devel' => 'automake',
|
'base-devel' => 'automake',
|
||||||
'gettext-devel' => 'gettextize',
|
'gettext-devel' => 'gettextize',
|
||||||
'gettext-dev' => 'gettextize',
|
'gettext-dev' => 'gettextize',
|
||||||
|
'perl-IPC-Cmd' => '/usr/share/doc/perl-IPC-Cmd'
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @noinspection PhpUnused */
|
/** @noinspection PhpUnused */
|
||||||
|
|||||||
Reference in New Issue
Block a user