diff --git a/__tests__/cache-restore.test.ts b/__tests__/cache-restore.test.ts index d622607e..929b8d56 100644 --- a/__tests__/cache-restore.test.ts +++ b/__tests__/cache-restore.test.ts @@ -228,9 +228,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py ); await expect(cacheDistributor.restoreCache()).rejects.toThrow( - `No file in ${process.cwd()} matched to [${cacheDependencyPath - .split('\n') - .join(',')}], make sure you have checked out the target repository` + `The cache folder path(s) for the package manager "pipenv" were retrieved but do not exist on the disk. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.` ); } ); diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 5ef82dab..870c4fd5 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -81041,7 +81041,7 @@ class CacheDistributor { .split('\n') .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` : this.cacheDependencyPath.split('\n').join(','); - throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository. No cache paths were identified for ${this.packageManager} with cache-dependency-path = ${this.cacheDependencyPath}. This likely indicates no dependencies to cache. Consider removing the cache step if it's not needed`); + throw new Error(`The cache folder path(s) for the package manager "${this.packageManager}" were retrieved but do not exist on the disk. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); } const cachePath = yield this.getCacheGlobalDirectories(); core.saveState(State.CACHE_PATHS, cachePath); @@ -81165,7 +81165,7 @@ function saveCache(packageManager) { const cachePaths = JSON.parse(cachePathState); core.debug(`paths for caching are ${cachePaths.join(', ')}`); if (!isCacheDirectoryExists(cachePaths)) { - throw new Error(`No file in ${process.cwd()} matched to [${cachePaths.join(', ')}], make sure you have checked out the target repository. No cache paths were identified for ${packageManager} with cache-dependency-path. This likely indicates no dependencies to cache. Consider removing the cache step if it's not needed.`); + throw new Error(`The cache folder path(s) for the package manager "${packageManager}" were retrieved but do not exist on the disk. The following paths were checked: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); } const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY); const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); diff --git a/dist/setup/index.js b/dist/setup/index.js index d93e68ee..307e1140 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -90243,7 +90243,7 @@ class CacheDistributor { .split('\n') .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` : this.cacheDependencyPath.split('\n').join(','); - throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository. No cache paths were identified for ${this.packageManager} with cache-dependency-path = ${this.cacheDependencyPath}. This likely indicates no dependencies to cache. Consider removing the cache step if it's not needed`); + throw new Error(`The cache folder path(s) for the package manager "${this.packageManager}" were retrieved but do not exist on the disk. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); } const cachePath = yield this.getCacheGlobalDirectories(); core.saveState(State.CACHE_PATHS, cachePath); diff --git a/src/cache-distributions/cache-distributor.ts b/src/cache-distributions/cache-distributor.ts index 842fb708..bc80d597 100644 --- a/src/cache-distributions/cache-distributor.ts +++ b/src/cache-distributions/cache-distributor.ts @@ -32,11 +32,7 @@ abstract class CacheDistributor { .join(',')} or ${CACHE_DEPENDENCY_BACKUP_PATH}` : this.cacheDependencyPath.split('\n').join(','); throw new Error( - `No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository. No cache paths were identified for ${ - this.packageManager - } with cache-dependency-path = ${ - this.cacheDependencyPath - }. This likely indicates no dependencies to cache. Consider removing the cache step if it's not needed` + `The cache folder path(s) for the package manager "${this.packageManager}" were retrieved but do not exist on the disk. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.` ); } diff --git a/src/cache-save.ts b/src/cache-save.ts index 6bd44df8..cf8e9b82 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -39,9 +39,9 @@ async function saveCache(packageManager: string) { if (!isCacheDirectoryExists(cachePaths)) { throw new Error( - `No file in ${process.cwd()} matched to [${cachePaths.join( + `The cache folder path(s) for the package manager "${packageManager}" were retrieved but do not exist on the disk. The following paths were checked: ${cachePaths.join( ', ' - )}], make sure you have checked out the target repository. No cache paths were identified for ${packageManager} with cache-dependency-path. This likely indicates no dependencies to cache. Consider removing the cache step if it's not needed.` + )}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.` ); }