summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xpackages/opencode/script/build.ts6
-rw-r--r--packages/opencode/script/postinstall.mjs4
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts
index 2aaaaa2f5..6731bea0b 100755
--- a/packages/opencode/script/build.ts
+++ b/packages/opencode/script/build.ts
@@ -66,11 +66,11 @@ const allTargets: {
avx2: false,
},
{
- os: "win32",
+ os: "windows",
arch: "x64",
},
{
- os: "win32",
+ os: "windows",
arch: "x64",
avx2: false,
},
@@ -127,7 +127,7 @@ for (const item of targets) {
{
name,
version: Script.version,
- os: [item.os],
+ os: [item.os === "windows" ? "win32" : item.os],
cpu: [item.arch],
},
null,
diff --git a/packages/opencode/script/postinstall.mjs b/packages/opencode/script/postinstall.mjs
index 89e670754..23a665175 100644
--- a/packages/opencode/script/postinstall.mjs
+++ b/packages/opencode/script/postinstall.mjs
@@ -20,7 +20,7 @@ function detectPlatformAndArch() {
platform = "linux"
break
case "win32":
- platform = "win32"
+ platform = "windows"
break
default:
platform = os.platform()
@@ -50,7 +50,7 @@ function detectPlatformAndArch() {
function findBinary() {
const { platform, arch } = detectPlatformAndArch()
const packageName = `opencode-${platform}-${arch}`
- const binaryName = platform === "win32" ? "opencode.exe" : "opencode"
+ const binaryName = platform === "windows" ? "opencode.exe" : "opencode"
try {
// Use require.resolve to find the package