Skip to content

Commit 9eca781

Browse files
fix(ng-dev): fix interactive rebase env (#2728)
The env variable is only needed with autosquash. Otherwise the editor will not be presented.
1 parent 77fb8b4 commit 9eca781

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ng-dev/pr/rebase/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,13 @@ export async function rebasePr(prNumber: number, interactive: boolean = false):
100100
* fixup commits should occur.
101101
*/
102102

103+
// the env variable prevents the editor from showing in the case of fixup commits and not
104+
// interactively rebasing
105+
const env =
106+
squashFixups && !interactive ? {...process.env, GIT_SEQUENCE_EDITOR: 'true'} : undefined;
103107
let flags: string[] = [];
104-
let env = undefined;
105108

106109
if (squashFixups || interactive) {
107-
env = {...process.env, GIT_SEQUENCE_EDITOR: 'true'};
108110
flags.push('--interactive');
109111
}
110112
if (squashFixups) {

0 commit comments

Comments
 (0)