fix perl-IPC-Cmd check so it doesn't try installing it every time

This commit is contained in:
DubbleClick 2025-08-27 11:40:06 +07:00
parent ecdb94b429
commit 08ab3c17d6
2 changed files with 4 additions and 0 deletions

View File

@ -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;

View File

@ -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 */