From 608a5559ac305c6a03b4b972b8651a1894d736ea Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Thu, 19 Jun 2025 12:38:05 +0700 Subject: [PATCH] fix incorrect array offset --- src/SPC/store/pkg/GoXcaddy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SPC/store/pkg/GoXcaddy.php b/src/SPC/store/pkg/GoXcaddy.php index 81f51266..e0c7c5b9 100644 --- a/src/SPC/store/pkg/GoXcaddy.php +++ b/src/SPC/store/pkg/GoXcaddy.php @@ -29,12 +29,12 @@ class GoXcaddy extends CustomPackage if (file_exists($go_exec) && file_exists($xcaddy_exec)) { return; } - $arch = match (explode('-', $name)[3]) { + $arch = match (explode('-', $name)[2]) { 'x86_64' => 'amd64', 'aarch64' => 'arm64', default => throw new \InvalidArgumentException('Unsupported architecture: ' . $name), }; - $os = match (explode('-', $name)[4]) { + $os = match (explode('-', $name)[3]) { 'linux' => 'linux', 'macos' => 'darwin', default => throw new \InvalidArgumentException('Unsupported OS: ' . $name),