Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
Anton Troshin 2024-11-19 13:05:53 -06:00
parent fd3fcb34ee
commit 896e2cbf0f
No known key found for this signature in database
GPG key ID: 9F8A96ACA9EB6363
2 changed files with 13 additions and 9 deletions

View file

@ -234,6 +234,7 @@ async function cacheWindowsDir(
// iterate through actual cache directory paths and make links if necessary
for (const cachePath of actualCacheDirectoryPaths) {
core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`);
if (!fs.existsSync(cachePath.actualPath)) {
core.info(`Creating directory ${cachePath.actualPath}`);
fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true});
@ -242,6 +243,7 @@ async function cacheWindowsDir(
}
// make sure the link is pointing to the actual cache directory
const symlinkTarget = fs.readlinkSync(cachePath.defaultPath);
core.info(`Symlink target: ${symlinkTarget}`);
if (symlinkTarget !== "") {
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
} else {