From 262e11fdfd567bbaeea13b7fb0dafebe592a7252 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 15 Sep 2021 00:22:14 +0300 Subject: [PATCH] minor changes --- dist/cache-save/index.js | 6 +++--- dist/setup/index.js | 6 +++--- src/cache-distributions/cache-distributor.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 18a5b49f..517d1e16 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -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]; diff --git a/dist/setup/index.js b/dist/setup/index.js index a0f9d021..b25535d0 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -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]; diff --git a/src/cache-distributions/cache-distributor.ts b/src/cache-distributions/cache-distributor.ts index d5184f9c..eb70f278 100644 --- a/src/cache-distributions/cache-distributor.ts +++ b/src/cache-distributions/cache-distributor.ts @@ -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}`);