From 68a68c276596c5ad895e1741fc34de7657f0939b Mon Sep 17 00:00:00 2001 From: Jessica Janiuk Date: Thu, 10 Apr 2025 16:18:05 +0200 Subject: [PATCH] fix(ng-dev): fix interactive rebase env The env variable is only needed with autosquash. Otherwise the editor will not be presented. --- ng-dev/pr/rebase/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ng-dev/pr/rebase/index.ts b/ng-dev/pr/rebase/index.ts index 2dc65f2c9..343a13be9 100644 --- a/ng-dev/pr/rebase/index.ts +++ b/ng-dev/pr/rebase/index.ts @@ -100,11 +100,13 @@ export async function rebasePr(prNumber: number, interactive: boolean = false): * fixup commits should occur. */ + // the env variable prevents the editor from showing in the case of fixup commits and not + // interactively rebasing + const env = + squashFixups && !interactive ? {...process.env, GIT_SEQUENCE_EDITOR: 'true'} : undefined; let flags: string[] = []; - let env = undefined; if (squashFixups || interactive) { - env = {...process.env, GIT_SEQUENCE_EDITOR: 'true'}; flags.push('--interactive'); } if (squashFixups) {