Skip to content

Commit bd30e75

Browse files
committed
Simplify getOverlayDatabaseMode
1 parent 59ce4c1 commit bd30e75

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/config-utils.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -706,22 +706,20 @@ export async function getOverlayDatabaseMode(
706706
`Setting overlay database mode to ${overlayDatabaseMode} ` +
707707
`due to insufficient disk space (${diskSpaceMb} MB).`,
708708
);
709-
} else {
710-
if (isAnalyzingPullRequest()) {
711-
overlayDatabaseMode = OverlayDatabaseMode.Overlay;
712-
useOverlayDatabaseCaching = true;
713-
logger.info(
714-
`Setting overlay database mode to ${overlayDatabaseMode} ` +
715-
"with caching because we are analyzing a pull request.",
716-
);
717-
} else if (await isAnalyzingDefaultBranch()) {
718-
overlayDatabaseMode = OverlayDatabaseMode.OverlayBase;
719-
useOverlayDatabaseCaching = true;
720-
logger.info(
721-
`Setting overlay database mode to ${overlayDatabaseMode} ` +
722-
"with caching because we are analyzing the default branch.",
723-
);
724-
}
709+
} else if (isAnalyzingPullRequest()) {
710+
overlayDatabaseMode = OverlayDatabaseMode.Overlay;
711+
useOverlayDatabaseCaching = true;
712+
logger.info(
713+
`Setting overlay database mode to ${overlayDatabaseMode} ` +
714+
"with caching because we are analyzing a pull request.",
715+
);
716+
} else if (await isAnalyzingDefaultBranch()) {
717+
overlayDatabaseMode = OverlayDatabaseMode.OverlayBase;
718+
useOverlayDatabaseCaching = true;
719+
logger.info(
720+
`Setting overlay database mode to ${overlayDatabaseMode} ` +
721+
"with caching because we are analyzing the default branch.",
722+
);
725723
}
726724
}
727725

0 commit comments

Comments
 (0)