Skip to content

Commit 99690f3

Browse files
committed
fix: restore orElseSucceed on exists in config discovery to avoid aborting parent walk
When fileSystem.exists fails (e.g. permission denied), treat it as 'not found' instead of throwing VcsProjectConfigError, so the upward directory walk continues and can still find a valid .t3code/vcs.json in a parent directory.
1 parent 69d4522 commit 99690f3

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

apps/server/src/vcs/VcsProjectConfig.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,7 @@ export const make = Effect.gen(function* () {
6262
let current = cwd;
6363
while (true) {
6464
const candidate = path.join(current, ".t3code", "vcs.json");
65-
const exists = yield* fileSystem.exists(candidate).pipe(
66-
Effect.mapError(
67-
(cause) =>
68-
new VcsProjectConfigError({
69-
operation: "inspect",
70-
cwd,
71-
configPath: candidate,
72-
cause,
73-
}),
74-
),
75-
);
65+
const exists = yield* fileSystem.exists(candidate).pipe(Effect.orElseSucceed(() => false));
7666
if (exists) {
7767
return Option.some(candidate);
7868
}

0 commit comments

Comments
 (0)