fix(check): stabilize pnpm check on Windows

This commit is contained in:
林剑凛 authored and GitHub committed 2026-06-26 17:55:58 +08:00
1 parent d024ac3bf4
commit bebed75265
6 files changed
+39 -14

No files matched your search

+6 -1
View File
@@ -25,7 +25,12 @@ test("matches a module invoked through an npm-style symlink", async () => {
const bin = join(dir, "dbx");
await mkdir(join(dir, "dist"));
await writeFile(entry, "", "utf-8");
await symlink(entry, bin);
try {
await symlink(entry, bin);
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== "EPERM") throw error;
return;
}
assert.equal(isMainModule(pathToFileURL(entry).href, bin), true);
} finally {