mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +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;
|
$pkgroot = PKG_ROOT_PATH;
|
||||||
$go_exec = "{$pkgroot}/{$name}/bin/go";
|
$go_exec = "{$pkgroot}/{$name}/bin/go";
|
||||||
$xcaddy_exec = "{$pkgroot}/{$name}/bin/xcaddy";
|
$xcaddy_exec = "{$pkgroot}/{$name}/bin/xcaddy";
|
||||||
|
if ($force) {
|
||||||
|
FileSystem::removeDir("{$pkgroot}/{$name}");
|
||||||
|
}
|
||||||
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
|
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,12 +26,12 @@ class Zig extends CustomPackage
|
|||||||
{
|
{
|
||||||
$pkgroot = PKG_ROOT_PATH;
|
$pkgroot = PKG_ROOT_PATH;
|
||||||
$zig_exec = match (PHP_OS_FAMILY) {
|
$zig_exec = match (PHP_OS_FAMILY) {
|
||||||
'Windows' => "{$pkgroot}/{$name}/bin/zig.exe",
|
'Windows' => "{$pkgroot}/{$name}/zig.exe",
|
||||||
default => "{$pkgroot}/{$name}/bin/zig",
|
default => "{$pkgroot}/{$name}/zig",
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($force) {
|
if ($force) {
|
||||||
FileSystem::removeDir($pkgroot . '/' . $name);
|
FileSystem::removeDir("{$pkgroot}/{$name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($zig_exec)) {
|
if (file_exists($zig_exec)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user