minor changes

This commit is contained in:
Dmitry Shibanov 2021-09-15 00:22:14 +03:00
parent 5fe7a0b444
commit 262e11fdfd
3 changed files with 9 additions and 9 deletions

View file

@ -35052,9 +35052,9 @@ class CacheDistributor {
if (stderr) {
throw new Error(`failed to procceed with caching with error: ${exitCode}`);
}
let resolvedPath = stdout;
if (stdout.includes('~')) {
resolvedPath = path.join(os.homedir(), stdout.slice(1));
let resolvedPath = stdout.trim();
if (resolvedPath.includes('~')) {
resolvedPath = path.join(os.homedir(), resolvedPath.slice(1));
}
core.info(`global cache directory path is ${resolvedPath}`);
return [resolvedPath];

6
dist/setup/index.js vendored
View file

@ -36821,9 +36821,9 @@ class CacheDistributor {
if (stderr) {
throw new Error(`failed to procceed with caching with error: ${exitCode}`);
}
let resolvedPath = stdout;
if (stdout.includes('~')) {
resolvedPath = path.join(os.homedir(), stdout.slice(1));
let resolvedPath = stdout.trim();
if (resolvedPath.includes('~')) {
resolvedPath = path.join(os.homedir(), resolvedPath.slice(1));
}
core.info(`global cache directory path is ${resolvedPath}`);
return [resolvedPath];

View file

@ -29,10 +29,10 @@ abstract class CacheDistributor {
);
}
let resolvedPath = stdout;
let resolvedPath = stdout.trim();
if (stdout.includes('~')) {
resolvedPath = path.join(os.homedir(), stdout.slice(1));
if (resolvedPath.includes('~')) {
resolvedPath = path.join(os.homedir(), resolvedPath.slice(1));
}
core.info(`global cache directory path is ${resolvedPath}`);