Skip to content

Commit a44d906

Browse files
committed
fix existing check for Zig::fetch
1 parent d6b0912 commit a44d906

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/SPC/store/pkg/GoXcaddy.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public function fetch(string $name, bool $force = false, ?array $config = null):
2626
$pkgroot = PKG_ROOT_PATH;
2727
$go_exec = "{$pkgroot}/{$name}/bin/go";
2828
$xcaddy_exec = "{$pkgroot}/{$name}/bin/xcaddy";
29+
if ($force) {
30+
FileSystem::removeDir("{$pkgroot}/{$name}");
31+
}
2932
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
3033
return;
3134
}

src/SPC/store/pkg/Zig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public function fetch(string $name, bool $force = false, ?array $config = null):
2626
{
2727
$pkgroot = PKG_ROOT_PATH;
2828
$zig_exec = match (PHP_OS_FAMILY) {
29-
'Windows' => "{$pkgroot}/{$name}/bin/zig.exe",
30-
default => "{$pkgroot}/{$name}/bin/zig",
29+
'Windows' => "{$pkgroot}/{$name}/zig.exe",
30+
default => "{$pkgroot}/{$name}/zig",
3131
};
3232

3333
if ($force) {
34-
FileSystem::removeDir($pkgroot . '/' . $name);
34+
FileSystem::removeDir("{$pkgroot}/{$name}");
3535
}
3636

3737
if (file_exists($zig_exec)) {

0 commit comments

Comments
 (0)