cache platform binary in postinstall for faster startup (#14467)
This commit is contained in:
parent
46361cf35c
commit
1d9f05e4f5
2 changed files with 14 additions and 2 deletions
|
|
@ -25,6 +25,12 @@ if (envPath) {
|
|||
const scriptPath = fs.realpathSync(__filename)
|
||||
const scriptDir = path.dirname(scriptPath)
|
||||
|
||||
//
|
||||
const cached = path.join(scriptDir, ".opencode")
|
||||
if (fs.existsSync(cached)) {
|
||||
run(cached)
|
||||
}
|
||||
|
||||
const platformMap = {
|
||||
darwin: "darwin",
|
||||
linux: "linux",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue