From 2bcf54fc2ed323030d75550d7db3a297a48a9ae3 Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Tue, 13 Feb 2024 22:43:42 -0500 Subject: [PATCH] fix: add more information for #216 --- .nvmrc | 1 + index.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..8b0beab --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.11.0 diff --git a/index.js b/index.js index 0d07d89..019dcd7 100644 --- a/index.js +++ b/index.js @@ -47,13 +47,11 @@ const restoreCachedNpm = npmCache => { } const saveCachedNpm = npmCache => { - console.log('saving NPM modules') + console.log('saving NPM modules under key %s', npmCache.primaryKey) + console.log('input paths: %o', npmCache.inputPaths) return cache - .saveCache( - npmCache.inputPaths.slice(), // Copy inputPaths, to work arround bug reported in https://github.com/actions/toolkit/pull/1378 - npmCache.primaryKey - ) + .saveCache(npmCache.inputPaths, npmCache.primaryKey) .catch(err => { // don't throw an error if cache already exists, which may happen due to // race conditions @@ -64,6 +62,8 @@ const saveCachedNpm = npmCache => { // do not rethrow here or github actions will break (https://github.com/bahmutov/npm-install/issues/142) console.warn(`saving npm cache failed with ${err}, continuing...`) + console.warn('cache key %s', npmCache.primaryKey) + console.warn('input paths %o', npmCache.inputPaths) }) }