Skip to content

Commit

Permalink
create temp dir on d: & link
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Jul 11, 2023
1 parent d796c38 commit 19671de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61462,6 +61462,13 @@ function installGoVersion(info, auth, arch) {
core.info('Adding to the cache ...');
const cachedDir = yield tc.cacheDir(extPath, 'go', makeSemver(info.resolvedVersion), arch);
core.info(`Successfully cached go to ${cachedDir}`);
const lnkDest = cachedDir;
const lnkSrc = lnkDest.replace(tempCacheDir, oldCacheDir);
const lnkSrcDir = path.dirname(lnkSrc);
fs_1.default.mkdirSync(lnkSrcDir, { recursive: true });
fs_1.default.symlinkSync(lnkDest, lnkSrc, 'junction');
core.info(`Created link ${lnkSrc} => ${lnkDest}`);
process.env['RUNNER_TOOL_CACHE'] = oldCacheDir;
return cachedDir;
});
}
Expand Down
7 changes: 7 additions & 0 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ async function installGoVersion(
arch
);
core.info(`Successfully cached go to ${cachedDir}`);
const lnkDest = cachedDir
const lnkSrc = lnkDest.replace(tempCacheDir, oldCacheDir)
const lnkSrcDir = path.dirname(lnkSrc)
fs.mkdirSync(lnkSrcDir, {recursive: true})
fs.symlinkSync(lnkDest, lnkSrc, 'junction')
core.info(`Created link ${lnkSrc} => ${lnkDest}`);
process.env['RUNNER_TOOL_CACHE'] = oldCacheDir;
return cachedDir;
}

Expand Down

0 comments on commit 19671de

Please sign in to comment.