mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-12-26 23:12:21 -05:00
move symlink check
Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
parent
6cd0eaadd6
commit
fd3fcb34ee
1 changed files with 10 additions and 10 deletions
|
@ -239,16 +239,16 @@ async function cacheWindowsDir(
|
||||||
fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true});
|
fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true});
|
||||||
} else {
|
} else {
|
||||||
core.info(`Directory ${cachePath.actualPath} already exists`);
|
core.info(`Directory ${cachePath.actualPath} already exists`);
|
||||||
// make sure the link is pointing to the actual cache directory
|
}
|
||||||
const symlinkTarget = fs.readlinkSync(cachePath.defaultPath);
|
// make sure the link is pointing to the actual cache directory
|
||||||
if (symlinkTarget !== "") {
|
const symlinkTarget = fs.readlinkSync(cachePath.defaultPath);
|
||||||
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
if (symlinkTarget !== "") {
|
||||||
} else {
|
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
||||||
fs.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction');
|
} else {
|
||||||
core.info(
|
fs.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction');
|
||||||
`Created link ${cachePath.defaultPath} => ${cachePath.actualPath}`
|
core.info(
|
||||||
);
|
`Created link ${cachePath.defaultPath} => ${cachePath.actualPath}`
|
||||||
}
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue