mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-27 11:46:06 +01:00
fixes
This commit is contained in:
@@ -66,11 +66,11 @@ const allTargets: {
|
|||||||
avx2: false,
|
avx2: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
os: "win32",
|
os: "windows",
|
||||||
arch: "x64",
|
arch: "x64",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
os: "win32",
|
os: "windows",
|
||||||
arch: "x64",
|
arch: "x64",
|
||||||
avx2: false,
|
avx2: false,
|
||||||
},
|
},
|
||||||
@@ -127,7 +127,7 @@ for (const item of targets) {
|
|||||||
{
|
{
|
||||||
name,
|
name,
|
||||||
version: Script.version,
|
version: Script.version,
|
||||||
os: [item.os],
|
os: [item.os === "windows" ? "win32" : item.os],
|
||||||
cpu: [item.arch],
|
cpu: [item.arch],
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function detectPlatformAndArch() {
|
|||||||
platform = "linux"
|
platform = "linux"
|
||||||
break
|
break
|
||||||
case "win32":
|
case "win32":
|
||||||
platform = "win32"
|
platform = "windows"
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
platform = os.platform()
|
platform = os.platform()
|
||||||
@@ -50,7 +50,7 @@ function detectPlatformAndArch() {
|
|||||||
function findBinary() {
|
function findBinary() {
|
||||||
const { platform, arch } = detectPlatformAndArch()
|
const { platform, arch } = detectPlatformAndArch()
|
||||||
const packageName = `opencode-${platform}-${arch}`
|
const packageName = `opencode-${platform}-${arch}`
|
||||||
const binaryName = platform === "win32" ? "opencode.exe" : "opencode"
|
const binaryName = platform === "windows" ? "opencode.exe" : "opencode"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Use require.resolve to find the package
|
// Use require.resolve to find the package
|
||||||
|
|||||||
Reference in New Issue
Block a user