From e283d84e0c4aafc8fbd4096b18c5e2f60eb6c218 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Wed, 18 Sep 2024 15:24:10 +0530 Subject: [PATCH] error-message-update --- dist/cache-save/index.js | 2 +- dist/setup/index.js | 2 +- src/cache-distributions/cache-distributor.ts | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index aa4501f..d0b4dba 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`); + 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`); } const cachePath = yield this.getCacheGlobalDirectories(); core.saveState(State.CACHE_PATHS, cachePath); diff --git a/dist/setup/index.js b/dist/setup/index.js index f1e3e29..d93e68e 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`); + 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`); } 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 211946f..842fb70 100644 --- a/src/cache-distributions/cache-distributor.ts +++ b/src/cache-distributions/cache-distributor.ts @@ -32,7 +32,11 @@ 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 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` ); }