Skip to content

Fix slow cache restore on Windows #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
add logs
Signed-off-by: Anton Troshin <anton@diagrid.io>
  • Loading branch information
antontroshin committed Nov 19, 2024
commit 0859a18f70b7ee0c0b7a1035437d23b2f95b110b
3 changes: 3 additions & 0 deletions src/installer.ts
Original file line number Diff line number Diff line change
@@ -222,6 +222,8 @@ async function cacheWindowsDir(
throw new Error(`Could not get cache folder paths.`);
}

core.info(`Found Cache Directory Paths: ${cacheDirectoryPaths}`);

// replace cache directory path with actual cache directory path
const actualCacheDirectoryPaths = cacheDirectoryPaths.map(path => {
return {
@@ -233,6 +235,7 @@ async function cacheWindowsDir(
// iterate through actual cache directory paths and make links
for (const cachePath of actualCacheDirectoryPaths) {
if (!fs.existsSync(cachePath.actualPath)) {
core.info(`Creating directory ${cachePath.actualPath}`);
fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true});
}