|
|
@ -88402,12 +88402,17 @@ function cacheWindowsDir(extPath, tool, version, arch) {
|
|
|
|
for (const cachePath of actualCacheDirectoryPaths) {
|
|
|
|
for (const cachePath of actualCacheDirectoryPaths) {
|
|
|
|
core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`);
|
|
|
|
core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (!fs_1.default.existsSync(cachePath.defaultPath)) {
|
|
|
|
|
|
|
|
core.info(`Default path ${cachePath.defaultPath} does not exist`);
|
|
|
|
|
|
|
|
core.info(`Creating directory ${cachePath.defaultPath}`);
|
|
|
|
|
|
|
|
fs_1.default.mkdirSync(cachePath.defaultPath, { recursive: true });
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!fs_1.default.existsSync(cachePath.actualPath)) {
|
|
|
|
if (!fs_1.default.existsSync(cachePath.actualPath)) {
|
|
|
|
core.info(`Creating directory ${cachePath.actualPath}`);
|
|
|
|
core.info(`Actual path ${cachePath.actualPath} does not exist. Safe to create symlink`);
|
|
|
|
fs_1.default.mkdirSync(path.dirname(cachePath.actualPath), { recursive: true });
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
core.info(`Directory ${cachePath.actualPath} already exists`);
|
|
|
|
core.info(`Actual path ${cachePath.actualPath} already exists. Skipping symlink creation`);
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// check if the default path is a symlink
|
|
|
|
// check if the default path is a symlink
|
|
|
|
const isSymlink = fs_1.default.lstatSync(cachePath.defaultPath).isSymbolicLink();
|
|
|
|
const isSymlink = fs_1.default.lstatSync(cachePath.defaultPath).isSymbolicLink();
|
|
|
|