fix(update): keep downgrade follow-ups in-process

This commit is contained in:
Ayaan Zaidi
2026-04-15 11:34:47 +05:30
parent 60e2ccbd5b
commit 64f258fc49
2 changed files with 38 additions and 1 deletions

View File

@@ -814,6 +814,13 @@ async function continuePostCoreUpdateInFreshProcess(params: {
return true;
}
function shouldResumePostCoreUpdateInFreshProcess(params: {
result: UpdateRunResult;
downgradeRisk: boolean;
}): boolean {
return isPackageManagerUpdateMode(params.result.mode) && !params.downgradeRisk;
}
export async function updateCommand(opts: UpdateCommandOptions): Promise<void> {
suppressDeprecations();
const invocationCwd = tryResolveInvocationCwd();
@@ -1149,7 +1156,12 @@ export async function updateCommand(opts: UpdateCommandOptions): Promise<void> {
const postUpdateRoot = result.root ?? root;
let pluginsUpdatedInFreshProcess = false;
if (isPackageManagerUpdateMode(result.mode)) {
if (
shouldResumePostCoreUpdateInFreshProcess({
result,
downgradeRisk,
})
) {
pluginsUpdatedInFreshProcess = await continuePostCoreUpdateInFreshProcess({
root: postUpdateRoot,
channel,