From ed6eceba504e7f9058682019c475aa7f7a882c6e Mon Sep 17 00:00:00 2001 From: Chuck Chen <459052+chuckchen@users.noreply.github.com> Date: Mon, 12 Jan 2026 12:21:49 +0800 Subject: [PATCH] Remove the symlinkBinary function call that replaces the wrapper script The wrapper script in `bin/opencode` already has robust logic to find the correct platform-specific binary by searching through `node_modules`, so we don't need to replace it with a symlink. The postinstall script should only ensure the binary package is installed, not modify the wrapper script. --- packages/opencode/script/postinstall.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/opencode/script/postinstall.mjs b/packages/opencode/script/postinstall.mjs index 78f022c9f85..14103895a7d 100644 --- a/packages/opencode/script/postinstall.mjs +++ b/packages/opencode/script/postinstall.mjs @@ -106,8 +106,11 @@ async function main() { return } - const { binaryPath, binaryName } = findBinary() - symlinkBinary(binaryPath, binaryName) + // On non-Windows platforms, just verify the binary package exists + // Don't replace the wrapper script - it handles binary execution + const { binaryPath } = findBinary() + console.log(`Platform binary verified at: ${binaryPath}`) + console.log("Wrapper script will handle binary execution") } catch (error) { console.error("Failed to setup opencode binary:", error.message) process.exit(1)