diff options
Diffstat (limited to 'tools/util.js')
-rw-r--r-- | tools/util.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/util.js b/tools/util.js index 1497a2887..251aaa1fa 100644 --- a/tools/util.js +++ b/tools/util.js @@ -31,11 +31,17 @@ async function getFilesFromGit(baseDir, args) { throw new Error("gitLsFiles failed"); } - const files = output.split("\0").filter((line) => line.length > 0).map( - (filePath) => { - return Deno.realPathSync(join(baseDir, filePath)); - }, - ); + const files = output + .split("\0") + .filter((line) => line.length > 0) + .map((filePath) => { + try { + return Deno.realPathSync(join(baseDir, filePath)); + } catch { + return null; + } + }) + .filter((filePath) => filePath !== null); return files; } |