mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 23:35:37 +08:00
fix incorrect array offset
This commit is contained in:
@@ -29,12 +29,12 @@ class GoXcaddy extends CustomPackage
|
|||||||
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
|
if (file_exists($go_exec) && file_exists($xcaddy_exec)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$arch = match (explode('-', $name)[3]) {
|
$arch = match (explode('-', $name)[2]) {
|
||||||
'x86_64' => 'amd64',
|
'x86_64' => 'amd64',
|
||||||
'aarch64' => 'arm64',
|
'aarch64' => 'arm64',
|
||||||
default => throw new \InvalidArgumentException('Unsupported architecture: ' . $name),
|
default => throw new \InvalidArgumentException('Unsupported architecture: ' . $name),
|
||||||
};
|
};
|
||||||
$os = match (explode('-', $name)[4]) {
|
$os = match (explode('-', $name)[3]) {
|
||||||
'linux' => 'linux',
|
'linux' => 'linux',
|
||||||
'macos' => 'darwin',
|
'macos' => 'darwin',
|
||||||
default => throw new \InvalidArgumentException('Unsupported OS: ' . $name),
|
default => throw new \InvalidArgumentException('Unsupported OS: ' . $name),
|
||||||
|
|||||||
Reference in New Issue
Block a user