fix: check of xz

This commit is contained in:
Kévin Dunglas 2023-08-25 16:31:16 +02:00 committed by Jerry Ma
parent a8924ac4fe
commit 42e5877a7f

View File

@ -28,6 +28,7 @@ class LinuxToolCheckList
'git', 'autoconf', 'automake',
'tar', 'unzip', 'gzip',
'bzip2', 'cmake', 'patch',
'xz',
];
/** @noinspection PhpUnused */
@ -87,7 +88,7 @@ class LinuxToolCheckList
logger()->warning('Current user is not root, using sudo for running command');
}
try {
shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', $missing));
shell(true)->exec($prefix . $install_cmd . ' ' . implode(' ', str_replace('xz', 'xz-utils', $missing)));
} catch (RuntimeException) {
return false;
}