mirror of
https://github.com/actions/setup-go.git
synced 2023-09-23 05:03:39 +00:00
fix: sync .complete marker when caching tools on windows
This commit is contained in:
parent
aabcd82874
commit
89a192af9d
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.mkdirSync(path.dirname(defaultToolCacheDir), { recursive: true });
|
||||||
fs_1.default.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
fs_1.default.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
||||||
core.info(`Created link ${defaultToolCacheDir} => ${actualToolCacheDir}`);
|
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:
|
// make outer code to continue using toolcache as if it were installed on c:
|
||||||
// restore toolcache root to default drive c:
|
// restore toolcache root to default drive c:
|
||||||
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
||||||
|
@ -203,6 +203,11 @@ async function cacheWindowsDir(
|
|||||||
fs.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
fs.symlinkSync(actualToolCacheDir, defaultToolCacheDir, 'junction');
|
||||||
core.info(`Created link ${defaultToolCacheDir} => ${actualToolCacheDir}`);
|
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:
|
// make outer code to continue using toolcache as if it were installed on c:
|
||||||
// restore toolcache root to default drive c:
|
// restore toolcache root to default drive c:
|
||||||
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
|
||||||
|
Loading…
Reference in New Issue
Block a user