mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-12-26 06:52:18 -05:00
add logs
Signed-off-by: Anton Troshin <anton@diagrid.io>
This commit is contained in:
parent
fd3fcb34ee
commit
896e2cbf0f
2 changed files with 13 additions and 9 deletions
20
dist/setup/index.js
vendored
20
dist/setup/index.js
vendored
|
@ -88400,21 +88400,23 @@ function cacheWindowsDir(extPath, tool, version, arch) {
|
||||||
});
|
});
|
||||||
// iterate through actual cache directory paths and make links if necessary
|
// iterate through actual cache directory paths and make links if necessary
|
||||||
for (const cachePath of actualCacheDirectoryPaths) {
|
for (const cachePath of actualCacheDirectoryPaths) {
|
||||||
|
core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`);
|
||||||
if (!fs_1.default.existsSync(cachePath.actualPath)) {
|
if (!fs_1.default.existsSync(cachePath.actualPath)) {
|
||||||
core.info(`Creating directory ${cachePath.actualPath}`);
|
core.info(`Creating directory ${cachePath.actualPath}`);
|
||||||
fs_1.default.mkdirSync(path.dirname(cachePath.actualPath), { recursive: true });
|
fs_1.default.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_1.default.readlinkSync(cachePath.defaultPath);
|
// make sure the link is pointing to the actual cache directory
|
||||||
if (symlinkTarget !== "") {
|
const symlinkTarget = fs_1.default.readlinkSync(cachePath.defaultPath);
|
||||||
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
core.info(`Symlink target: ${symlinkTarget}`);
|
||||||
}
|
if (symlinkTarget !== "") {
|
||||||
else {
|
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
||||||
fs_1.default.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction');
|
}
|
||||||
core.info(`Created link ${cachePath.defaultPath} => ${cachePath.actualPath}`);
|
else {
|
||||||
}
|
fs_1.default.symlinkSync(cachePath.actualPath, cachePath.defaultPath, 'junction');
|
||||||
|
core.info(`Created link ${cachePath.defaultPath} => ${cachePath.actualPath}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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:
|
||||||
|
|
|
@ -234,6 +234,7 @@ async function cacheWindowsDir(
|
||||||
|
|
||||||
// iterate through actual cache directory paths and make links if necessary
|
// iterate through actual cache directory paths and make links if necessary
|
||||||
for (const cachePath of actualCacheDirectoryPaths) {
|
for (const cachePath of actualCacheDirectoryPaths) {
|
||||||
|
core.info(`Trying to link ${cachePath.defaultPath} to ${cachePath.actualPath}`);
|
||||||
if (!fs.existsSync(cachePath.actualPath)) {
|
if (!fs.existsSync(cachePath.actualPath)) {
|
||||||
core.info(`Creating directory ${cachePath.actualPath}`);
|
core.info(`Creating directory ${cachePath.actualPath}`);
|
||||||
fs.mkdirSync(path.dirname(cachePath.actualPath), {recursive: true});
|
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
|
// make sure the link is pointing to the actual cache directory
|
||||||
const symlinkTarget = fs.readlinkSync(cachePath.defaultPath);
|
const symlinkTarget = fs.readlinkSync(cachePath.defaultPath);
|
||||||
|
core.info(`Symlink target: ${symlinkTarget}`);
|
||||||
if (symlinkTarget !== "") {
|
if (symlinkTarget !== "") {
|
||||||
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
core.info(`Found link ${cachePath.defaultPath} => ${symlinkTarget}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue