Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions packages/build-tools/bridge-src/builtins/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4032,13 +4032,11 @@ var fs = {
const err = e;
if (err.code === "ELOOP") throw e;
if (err.code === "ENOENT" || err.code === "ENOTDIR") {
const enoent = new Error(`ENOENT: no such file or directory, realpath '${raw}'`);
enoent.code = "ENOENT";
enoent.syscall = "realpath";
enoent.path = raw;
throw enoent;
throw createFsError("ENOENT", `ENOENT: no such file or directory, realpath '${raw}'`, "realpath", raw);
}
break;
// Any other errno must reach the caller: returning here handed back the
// partially resolved prefix as if it were the real path.
throwNormalizedFsBridgeError(err, "realpath", raw);
}
}
return "/" + resolved.join("/") || "/";
Expand Down