mirror of
https://github.com/actions/setup-go.git
synced 2024-12-27 05:12:08 -05:00
fix: sync .complete marker when caching tools on windows
This commit is contained in:
parent
aabcd82874
commit
89a192af9d
2 changed files with 9 additions and 0 deletions
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
@ -61514,6 +61514,10 @@ function cacheWindowsDir(extPath, tool, version, arch) {
|
|||
fs_1.default.mkdirSync(path.dirname(defaultToolCacheDir), { recursive: true });
|
||||
fs_1.default.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
||||
core.info(`Created link ${defaultToolCacheDir} => ${actualToolCacheDir}`);
|
||||
const actualToolCacheCompleteFile = `${actualToolCacheDir}.complete`;
|
||||
const defaultToolCacheCompleteFile = `${defaultToolCacheDir}.complete`;
|
||||
fs_1.default.symlinkSync(actualToolCacheCompleteFile, defaultToolCacheCompleteFile, 'file');
|
||||
core.info(`Created link ${defaultToolCacheCompleteFile} => ${actualToolCacheCompleteFile}`);
|
||||
// make outer code to continue using toolcache as if it were installed on c:
|
||||
// restore toolcache root to default drive c:
|
||||
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
||||
|
|
|
@ -203,6 +203,11 @@ async function cacheWindowsDir(
|
|||
fs.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
||||
core.info(`Created link ${defaultToolCacheDir} => ${actualToolCacheDir}`);
|
||||
|
||||
const actualToolCacheCompleteFile = `${actualToolCacheDir}.complete`;
|
||||
const defaultToolCacheCompleteFile = `${defaultToolCacheDir}.complete`;
|
||||
fs.symlinkSync(actualToolCacheCompleteFile, defaultToolCacheCompleteFile, 'file');
|
||||
core.info(`Created link ${defaultToolCacheCompleteFile} => ${actualToolCacheCompleteFile}`);
|
||||
|
||||
// make outer code to continue using toolcache as if it were installed on c:
|
||||
// restore toolcache root to default drive c:
|
||||
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
||||
|
|
Loading…
Reference in a new issue