Skip to content

Commit 021cb46

Browse files
author
bcode
committed
fix(installation): point upgrade failures at the actual one-liner
Both UpgradeFailedError raise-sites now show: curl -fsSL https://bcode.sh/install | bash For the non-curl method path: replaces the prose hint with the runnable command. For the curl path that exited non-zero: keeps the install script's own stderr (useful diagnostic) and appends the one-liner as a fallback hint.
1 parent 2015fba commit 021cb46

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • packages/opencode/src/installation

packages/opencode/src/installation/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,14 @@ export const layer: Layer.Layer<Service, never, HttpClient.HttpClient | ChildPro
165165
return yield* new UpgradeFailedError({
166166
stderr:
167167
"Auto-upgrade currently supports only curl-installed bcode. " +
168-
"Reinstall via https://bcode.sh/install or download a release " +
169-
"from https://github.com/browser-use/browsercode/releases.",
168+
"Reinstall with:\n curl -fsSL https://bcode.sh/install | bash",
170169
})
171170
}
172171
const upgradeResult = yield* upgradeCurl(target)
173172
if (upgradeResult.code !== 0) {
174-
return yield* new UpgradeFailedError({ stderr: upgradeResult.stderr })
173+
return yield* new UpgradeFailedError({
174+
stderr: `${upgradeResult.stderr.trimEnd()}\n\nReinstall with:\n curl -fsSL https://bcode.sh/install | bash`,
175+
})
175176
}
176177
log.info("upgraded", { method: m, target, stdout: upgradeResult.stdout, stderr: upgradeResult.stderr })
177178
yield* text([process.execPath, "--version"])

0 commit comments

Comments
 (0)