Skip to content

Commit

Permalink
fix for path
Browse files Browse the repository at this point in the history
  • Loading branch information
yusancky authored Feb 5, 2024
1 parent b2fd603 commit 9ae36e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ const cachePackage = core.getInput("cache-dependency-path");
if (cachePackage) {
if (fs.existsSync(cachePackage)) {
const cacheDir = {
linux: join(process.env.XDG_CACHE_HOME!, "typst/packages"),
darwin: join(process.env.HOME!, "/Library/Caches/typst/packages"),
win32: join(process.env.LOCALAPPDATA!, "typst/packages"),
}[process.platform.toString()]!;
linux: () => join(xdgCache!, "typst/packages"),
darwin: () => join(process.env.HOME!, "Library/Caches", "typst/packages"),
win32: () => join(process.env.LOCALAPPDATA!, "typst/packages")
}[process.platform as string]!();
const hash = await glob.hashFiles(cachePackage);
const cacheKey = await cache.restoreCache(
[cacheDir],
Expand Down

0 comments on commit 9ae36e4

Please sign in to comment.