From 707de5832656e89cc0f04436aa1cd5f4f91c5763 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:23:56 -0500 Subject: [PATCH] fix(cli): prioritize path-matched package manager and extend probe timeout (#54622) --- packages/cli/src/services/updater.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/services/updater.ts b/packages/cli/src/services/updater.ts index 9f216bcf623..31270000e23 100644 --- a/packages/cli/src/services/updater.ts +++ b/packages/cli/src/services/updater.ts @@ -157,7 +157,7 @@ const make = Effect.gen(function* () { return values.findLast((value) => value !== undefined) ?? "notify" }) - const exec = Effect.fnUntraced(function* (command: string[], timeout: Duration.Input = "10 seconds") { + const exec = Effect.fnUntraced(function* (command: string[], timeout: Duration.Input = "30 seconds") { return yield* appProcess .run(ChildProcess.make(command[0], command.slice(1)), { timeout, @@ -202,13 +202,15 @@ const make = Effect.gen(function* () { if (installedFormula) return "brew" if (!installedPackage) return - const checks: ReadonlyArray<{ method: Method; command: string[] }> = [ + const parts = executable.toLowerCase().split(path.sep).map((part) => part.replace(/^\./, "")) + const checks: Array<{ method: Method; command: string[] }> = [ { method: "npm", command: ["npm", "list", "-g", "--depth=0", installedPackage] }, { method: "pnpm", command: ["pnpm", "list", "-g", "--depth=0", installedPackage] }, { method: "bun", command: ["bun", "pm", "ls", "-g"] }, { method: "yarn", command: ["yarn", "global", "list"] }, { method: "vp", command: ["vp", "list", "-g", "--json", installedPackage] }, ] + checks.sort((a, b) => Number(parts.includes(b.method)) - Number(parts.includes(a.method))) const results = yield* Effect.forEach( checks, (check) =>