Skip to content

Commit af51745

Browse files
committed
1 parent dbc7c4f commit af51745

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/only-include-used-icons.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as fs from "fs";
55
import { join as pathJoin } from "path";
66
import { assert } from "tsafe/assert";
77
import { exclude } from "tsafe/exclude";
8-
import { writeFile, readFile, rm, access } from "fs/promises";
8+
import { writeFile, readFile, rm, access, stat } from "fs/promises";
99
import { crawl } from "./tools/crawl";
1010
import { basename as pathBasename, sep as pathSep, dirname as pathDirname } from "path";
1111
import type { Equals } from "tsafe";
@@ -321,6 +321,10 @@ async function main() {
321321

322322
await Promise.all(
323323
candidateFilePaths.map(async candidateFilePath => {
324+
if ((await stat(candidateFilePath)).isSymbolicLink()) {
325+
return;
326+
}
327+
324328
const rawFileContent = (await readFile(candidateFilePath)).toString("utf8");
325329

326330
[

0 commit comments

Comments
 (0)