diff --git a/packages/opencode/script/postinstall.mjs b/packages/opencode/script/postinstall.mjs index 2c69741231..e03cf22cef 100644 --- a/packages/opencode/script/postinstall.mjs +++ b/packages/opencode/script/postinstall.mjs @@ -79,7 +79,7 @@ function main() { } // Create symlink to the actual binary - fs.symlinkSync(binaryPath, binScript) + fs.symlinkSync(path.relative(path.dirname(binScript), binaryPath), binScript) console.log(`opencode binary symlinked: ${binScript} -> ${binaryPath}`) } catch (error) { console.error("Failed to create opencode binary symlink:", error.message)