GeezerVison is showing github.com — Revert "cache platform binary in postinstall for faster startup" (#14… · rodboev/opencode@1ffed2f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/opencode/bin/opencode -5Lines changed: 0 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,11 +25,6 @@ if (envPath) { |
25 | 25 | const scriptPath = fs.realpathSync(__filename) |
26 | 26 | const scriptDir = path.dirname(scriptPath) |
27 | 27 |
|
28 | | -const cached = path.join(scriptDir, ".opencode") |
29 | | -if (fs.existsSync(cached)) { |
30 | | - run(cached) |
31 | | -} |
32 | | - |
33 | 28 | const platformMap = { |
34 | 29 | darwin: "darwin", |
35 | 30 | linux: "linux", |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/opencode/script/postinstall.mjs +4-8Lines changed: 4 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -106,15 +106,11 @@ async function main() { |
106 | 106 | return |
107 | 107 | } |
108 | 108 |
|
| 109 | + // On non-Windows platforms, just verify the binary package exists |
| 110 | + // Don't replace the wrapper script - it handles binary execution |
109 | 111 | const { binaryPath } = findBinary() |
110 | | - const target = path.join(__dirname, "..", "bin", ".opencode") |
111 | | - if (fs.existsSync(target)) fs.unlinkSync(target) |
112 | | - try { |
113 | | - fs.linkSync(binaryPath, target) |
114 | | - } catch { |
115 | | - fs.copyFileSync(binaryPath, target) |
116 | | - } |
117 | | - fs.chmodSync(target, 0o755) |
| 112 | + console.log(`Platform binary verified at: ${binaryPath}`) |
| 113 | + console.log("Wrapper script will handle binary execution") |
118 | 114 | } catch (error) { |
119 | 115 | console.error("Failed to setup opencode binary:", error.message) |
120 | 116 | process.exit(1) |
|