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";