diff options
| author | Aiden Cline <[email protected]> | 2025-12-13 23:45:15 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-13 23:45:15 -0600 |
| commit | f8bca50f00b62d723478f6b16fd115aa82f527fe (patch) | |
| tree | 50c14e50b7a83cb16b9cf7baeca4bf14138e778e | |
| parent | 3d2ef28fa870d82d246986fb95c9c5a96d605469 (diff) | |
| download | opencode-f8bca50f00b62d723478f6b16fd115aa82f527fe.tar.gz opencode-f8bca50f00b62d723478f6b16fd115aa82f527fe.zip | |
rm unnecessary code
| -rw-r--r-- | packages/opencode/src/bun/index.ts | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/packages/opencode/src/bun/index.ts b/packages/opencode/src/bun/index.ts index c0f90e6ca..5456d0a5b 100644 --- a/packages/opencode/src/bun/index.ts +++ b/packages/opencode/src/bun/index.ts @@ -85,47 +85,16 @@ export namespace BunProc { version, }) - const total = 3 - const wait = 500 - - const runInstall = async (count: number = 1): Promise<void> => { - log.info("bun install attempt", { - pkg, - version, - attempt: count, - total, - }) - await BunProc.run(args, { - cwd: Global.Path.cache, - }).catch(async (error) => { - log.warn("bun install failed", { - pkg, - version, - attempt: count, - total, - error, - }) - if (count >= total) { - throw new InstallFailedError( - { pkg, version }, - { - cause: error, - }, - ) - } - const delay = wait * count - log.info("bun install retrying", { - pkg, - version, - next: count + 1, - delay, - }) - await Bun.sleep(delay) - return runInstall(count + 1) - }) - } - - await runInstall() + await BunProc.run(args, { + cwd: Global.Path.cache, + }).catch((e) => { + throw new InstallFailedError( + { pkg, version }, + { + cause: e, + }, + ) + }) // Resolve actual version from installed package when using "latest" // This ensures subsequent starts use the cached version until explicitly updated |
