fix: address pr-bug-scan validated finding from #6527

Wrapped pairing-runtime startup in main() in a local try/catch so its failure logs a warning and continues the launch instead of hitting main()'s catch+exit(1).
This commit is contained in:
orca-bug-scan-bot
2026-06-27 20:28:45 -07:00
parent c16aa89ea7
commit 009a74a8e3
+22 -13
View File
@@ -545,19 +545,28 @@ async function main() {
logInfo(`Using worktree: ${worktree}`)
await ensureMobileDependencies(worktree)
pairingRuntime = await startHeadlessPairingRuntime({
enabled: options.pair,
orcaCli: ORCA_CLI,
cwd: process.cwd(),
lanIpCandidates,
logStep,
logSuccess
})
await registerWorktreeForPairingRuntime(pairingRuntime, worktree, {
orca,
logStep,
logSuccess
})
// Why: the temporary pairing runtime is auxiliary to launching the app. If it
// fails to start, never emits a pairing URL, or its worktree registration
// fails, keep going with the app launch instead of aborting the whole flow.
try {
pairingRuntime = await startHeadlessPairingRuntime({
enabled: options.pair,
orcaCli: ORCA_CLI,
cwd: process.cwd(),
lanIpCandidates,
logStep,
logSuccess
})
await registerWorktreeForPairingRuntime(pairingRuntime, worktree, {
orca,
logStep,
logSuccess
})
} catch (error) {
pairingRuntime?.stop()
pairingRuntime = null
logError(`Skipping mobile pairing: ${error.message}`)
}
// Find best device
const device = await findBestDevice(options.device)