Skip to content

Commit ea3dbd2

Browse files
test(server): keep the git template unset until its first commit lands
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e5b851c commit ea3dbd2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎apps/server/src/vcs/GitVcsDriverCore.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,12 @@ const initRepoWithCommit = (
373373
const empty =
374374
!(yield* fileSystem.exists(cwd)) || (yield* fileSystem.readDirectory(cwd)).length === 0;
375375
if (empty) {
376-
repoTemplate ??= yield* fileSystem.makeTempDirectory({ prefix: "git-vcs-driver-template-" });
377-
if (!(yield* fileSystem.exists(pathService.join(repoTemplate, ".git")))) {
378-
yield* commitInitialRepo(repoTemplate);
376+
if (!repoTemplate) {
377+
const template = yield* fileSystem.makeTempDirectory({
378+
prefix: "git-vcs-driver-template-",
379+
});
380+
yield* commitInitialRepo(template);
381+
repoTemplate = template;
379382
}
380383
yield* fileSystem.copy(repoTemplate, cwd);
381384
} else {

0 commit comments

Comments
 (0)