fix(cli): avoid AppRuntime re-entry for network options (#26052)

This commit is contained in:
Kit Langton
2026-05-06 11:02:08 -04:00
committed by GitHub
parent 889f979c0b
commit 63a175b50d
4 changed files with 8 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ export const WebCommand = effectCmd({
if (!Flag.OPENCODE_SERVER_PASSWORD) {
UI.println(UI.Style.TEXT_WARNING_BOLD + "! OPENCODE_SERVER_PASSWORD is not set; server is unsecured.")
}
const opts = yield* Effect.promise(() => resolveNetworkOptions(args))
const opts = yield* resolveNetworkOptions(args)
const server = yield* Effect.promise(() => Server.listen(opts))
UI.empty()
UI.println(UI.logo(" "))
@@ -72,7 +72,7 @@ export const WebCommand = effectCmd({
}
// Open localhost in browser
open(localhostUrl.toString()).catch(() => {})
open(localhostUrl).catch(() => {})
} else {
const displayUrl = server.url.toString()
UI.println(UI.Style.TEXT_INFO_BOLD + " Web interface: ", UI.Style.TEXT_NORMAL, displayUrl)