diff --git a/apps/server/src/bootstrap.ts b/apps/server/src/bootstrap.ts index 9ad6328798..f6df92b822 100644 --- a/apps/server/src/bootstrap.ts +++ b/apps/server/src/bootstrap.ts @@ -160,9 +160,12 @@ const makeDirectBootstrapStream = (fd: number): Readable => { } }; +// Stdin pipes inherited across the wsl.exe boundary report EACCES when we try +// to re-open them via /proc/self/fd/0 — fall back to reading the fd directly +// in that case, the same way we already do for ENXIO/EINVAL/EPERM. const isBootstrapFdPathDuplicationError = Predicate.compose( Predicate.hasProperty("code"), - (_) => _.code === "ENXIO" || _.code === "EINVAL" || _.code === "EPERM", + (_) => _.code === "ENXIO" || _.code === "EINVAL" || _.code === "EPERM" || _.code === "EACCES", ); export function resolveFdPath(