fix(config): handle unavailable config directories (#35632)

Co-authored-by: James Long <jlongster@users.noreply.github.com>
This commit is contained in:
James Long
2026-07-06 22:11:13 -04:00
committed by GitHub
parent cbdd9a7f93
commit 68871fcc39
3 changed files with 30 additions and 3 deletions
+4 -3
View File
@@ -60,9 +60,10 @@ export namespace FSUtil {
})
const readFileStringSafe = Effect.fn("FileSystem.readFileStringSafe")(function* (path: string) {
return yield* fs
.readFileString(path)
.pipe(Effect.catchReason("PlatformError", "NotFound", () => Effect.succeed(undefined)))
return yield* fs.readFileString(path).pipe(
Effect.catchReason("PlatformError", "NotFound", () => Effect.succeed(undefined)),
Effect.catchReason("PlatformError", "PermissionDenied", () => Effect.succeed(undefined)),
)
})
const isDir = Effect.fn("FileSystem.isDir")(function* (path: string) {