Fix docker doctor fix pkgroot volume overwrite bug

This commit is contained in:
crazywhalecc
2025-09-04 12:03:13 +08:00
parent 38ec03fe30
commit a79564f685
5 changed files with 24 additions and 3 deletions

View File

@@ -29,6 +29,18 @@ class PkgConfigCheck
return CheckResult::ok($pkgconf);
}
#[AsCheckItem('if pkg-config is working', level: 799)]
public function checkPkgConfigFunctional(): CheckResult
{
$pkgconf = PkgConfigUtil::findPkgConfig();
// check if pkg-config is functional
[$ret, $output] = shell()->execWithResult("{$pkgconf} --version", false);
if ($ret === 0) {
return CheckResult::ok(implode(' ', $output));
}
return CheckResult::fail('pkg-config is not functional', 'install-pkgconfig');
}
#[AsFixItem('install-pkgconfig')]
public function installPkgConfig(): bool
{