Skip to content

Commit 9b6ef07

Browse files
authored
Reference the actual name of the windows package (anomalyco#1700)
1 parent 2f42916 commit 9b6ef07

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/opencode/bin/opencode.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set "script_dir=%~dp0"
1111
set "script_dir=%script_dir:~0,-1%"
1212

1313
rem Detect platform and architecture
14-
set "platform=win32"
14+
set "platform=windows"
1515

1616
rem Detect architecture
1717
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (

packages/opencode/script/postinstall.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function detectPlatformAndArch() {
2020
platform = "linux"
2121
break
2222
case "win32":
23-
platform = "win32"
23+
platform = "windows"
2424
break
2525
default:
2626
platform = os.platform()
@@ -50,7 +50,7 @@ function detectPlatformAndArch() {
5050
function findBinary() {
5151
const { platform, arch } = detectPlatformAndArch()
5252
const packageName = `opencode-${platform}-${arch}`
53-
const binary = platform === "win32" ? "opencode.exe" : "opencode"
53+
const binary = platform === "windows" ? "opencode.exe" : "opencode"
5454

5555
try {
5656
// Use require.resolve to find the package

0 commit comments

Comments
 (0)