Skip to content

Commit dd2cd44

Browse files
committed
fix "doesNeedToApply" - if there's no rewritten-list, then there's nothing to apply (?)
Signed-off-by: Kipras Melnikovas <[email protected]>
1 parent 11cd8c3 commit dd2cd44

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apply.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@ export const markThatApplied = (pathToStackedRebaseDirInsideDotGit: string): voi
134134
const doesNeedToApply = (pathToStackedRebaseDirInsideDotGit: string): boolean => {
135135
const { rewrittenListPath, needsToApplyPath, appliedPath } = getPaths(pathToStackedRebaseDirInsideDotGit);
136136

137+
if (!fs.existsSync(rewrittenListPath)) {
138+
/**
139+
* nothing to apply
140+
*/
141+
return false;
142+
}
143+
137144
const needsToApplyPart1: boolean = fs.existsSync(needsToApplyPath);
138145
if (needsToApplyPart1) {
139146
return true;

0 commit comments

Comments
 (0)