mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-26 12:14:20 +01:00
Reference the actual name of the windows package (#1700)
This commit is contained in:
@@ -11,7 +11,7 @@ set "script_dir=%~dp0"
|
||||
set "script_dir=%script_dir:~0,-1%"
|
||||
|
||||
rem Detect platform and architecture
|
||||
set "platform=win32"
|
||||
set "platform=windows"
|
||||
|
||||
rem Detect architecture
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
|
||||
@@ -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 binary = platform === "win32" ? "opencode.exe" : "opencode"
|
||||
const binary = platform === "windows" ? "opencode.exe" : "opencode"
|
||||
|
||||
try {
|
||||
// Use require.resolve to find the package
|
||||
|
||||
Reference in New Issue
Block a user