fix existing check for Zig::fetch

This commit is contained in:
DubbleClick 2025-06-29 00:49:39 +07:00
parent d6b0912492
commit a44d90671c
2 changed files with 6 additions and 3 deletions

View File

@ -26,6 +26,9 @@ class GoXcaddy extends CustomPackage
$pkgroot = PKG_ROOT_PATH;
$go_exec = "{$pkgroot}/{$name}/bin/go";
$xcaddy_exec = "{$pkgroot}/{$name}/bin/xcaddy";
if ($force) {
FileSystem::removeDir("{$pkgroot}/{$name}");
}
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
return;
}

View File

@ -26,12 +26,12 @@ class Zig extends CustomPackage
{
$pkgroot = PKG_ROOT_PATH;
$zig_exec = match (PHP_OS_FAMILY) {
'Windows' => "{$pkgroot}/{$name}/bin/zig.exe",
default => "{$pkgroot}/{$name}/bin/zig",
'Windows' => "{$pkgroot}/{$name}/zig.exe",
default => "{$pkgroot}/{$name}/zig",
};
if ($force) {
FileSystem::removeDir($pkgroot . '/' . $name);
FileSystem::removeDir("{$pkgroot}/{$name}");
}
if (file_exists($zig_exec)) {