mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
fix existing check for Zig::fetch
This commit is contained in:
parent
d6b0912492
commit
a44d90671c
@ -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;
|
||||
}
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user