Skip to content

Commit 4062b4f

Browse files
committed
[fix-vendored-twsearch.ts] Skip directory nodes when copying/fixing files.
We need to exclude these due to a `bun` change that brought it in line with `node`, which is due to an unrelated issue I filed: oven-sh/bun#20507
1 parent 0b9b430 commit 4062b4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/fix-vendored-twsearch.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const DIR = fileURLToPath(
66
new URL("../src/cubing/vendor/mpl/twsearch", import.meta.url),
77
);
88

9-
for (const fileName of await readdir(DIR)) {
9+
for (const dirEnt of await readdir(DIR, { withFileTypes: true })) {
10+
const { name: fileName, isDirectory } = dirEnt;
11+
if (isDirectory()) {
12+
continue;
13+
}
1014
const filePath = join(DIR, fileName);
1115
console.log("Fixing:", filePath);
1216
let contents = await readFile(filePath, "utf-8");

0 commit comments

Comments
 (0)