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 d4036c8 commit bdb81f4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ core.info(`✅ Typst v${version} installed!`);
const cachePackage = core.getInput("cache-dependency-path");
if (cachePackage) {
if (fs.existsSync(cachePackage)) {
const packagePath = {
linux: "$XDG_CACHE_HOME",
darwin: "~/Library/Caches",
win32: "%LOCALAPPDATA%",
const cachePath = {
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()]!;
let cachePath = `${packagePath}/typst/packages/preview/`;
const hash = await glob.hashFiles(cachePackage);
const cacheKey = await cache.restoreCache(
[cachePath],
Expand Down

0 comments on commit bdb81f4

Please sign in to comment.