From 31cbc3349c5ada68238919a5f2f66a28e2023c11 Mon Sep 17 00:00:00 2001 From: mbelinky Date: Mon, 13 Apr 2026 17:03:15 +0200 Subject: [PATCH] CLI: fix rebased gateway update tests --- src/cli/update-cli.test.ts | 4 ++-- src/cli/update-cli/update-command.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli/update-cli.test.ts b/src/cli/update-cli.test.ts index cad3b55f03a..7bbf8e8be23 100644 --- a/src/cli/update-cli.test.ts +++ b/src/cli/update-cli.test.ts @@ -458,13 +458,13 @@ describe("update-cli", () => { }); it("respawns into the updated package root before running post-update tasks", async () => { - const { entryPath } = setupUpdatedRootRefresh(); + const { entrypoints } = setupUpdatedRootRefresh(); await updateCommand({ yes: true }); expect(spawn).toHaveBeenCalledWith( expect.stringMatching(/node/), - [entryPath, "update", "--yes"], + [entrypoints[0], "update", "--yes"], expect.objectContaining({ stdio: "inherit", env: expect.objectContaining({ diff --git a/src/cli/update-cli/update-command.ts b/src/cli/update-cli/update-command.ts index 3003c6c3afa..6eb79fbac7f 100644 --- a/src/cli/update-cli/update-command.ts +++ b/src/cli/update-cli/update-command.ts @@ -44,6 +44,7 @@ import { runCommandWithTimeout } from "../../process/exec.js"; import { defaultRuntime } from "../../runtime.js"; import { stylePromptMessage } from "../../terminal/prompt-style.js"; import { theme } from "../../terminal/theme.js"; +import { pathExists } from "../../utils.js"; import { replaceCliName, resolveCliName } from "../cli-name.js"; import { formatCliCommand } from "../command-format.js"; import { installCompletion } from "../completion-runtime.js";