We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a483c42 commit 292df38Copy full SHA for 292df38
src/SPC/store/pkg/GoXcaddy.php
@@ -10,6 +10,23 @@
10
11
class GoXcaddy extends CustomPackage
12
{
13
+ public static function isInstalled(): bool
14
+ {
15
+ $arch = arch2gnu(php_uname('m'));
16
+ $os = match (PHP_OS_FAMILY) {
17
+ 'Windows' => 'win',
18
+ 'Darwin' => 'macos',
19
+ 'BSD' => 'freebsd',
20
+ default => 'linux',
21
+ };
22
+
23
+ $packageName = "go-xcaddy-{$arch}-{$os}";
24
+ $pkgroot = PKG_ROOT_PATH;
25
+ $folder = "{$pkgroot}/{$packageName}";
26
27
+ return is_dir($folder) && is_file("{$folder}/bin/go") && is_file("{$folder}/bin/xcaddy");
28
+ }
29
30
public function getSupportName(): array
31
32
return [
0 commit comments