Skip to content

Commit cd0d8dc

Browse files
committed
tolerate filesDir not existing in cleanup
1 parent f955b96 commit cd0d8dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/command/render/cleanup.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ export function renderCleanup(
5757
}
5858
// narrow supporting to figures dir for non-html formats
5959
} else {
60-
const filesDir = join(
61-
dirname(Deno.realPathSync(input)),
60+
let filesDir = join(
61+
dirname(input),
6262
inputFilesDir(input),
6363
);
64+
if (existsSync(filesDir)) {
65+
filesDir = Deno.realPathSync(filesDir);
66+
}
6467
supporting = supporting.map((supportingDir) => {
6568
if (filesDir === supportingDir) {
6669
return join(filesDir, figuresDir(figureFormat));

0 commit comments

Comments
 (0)