Skip to content

Commit 751276e

Browse files
v-lmvysakhlmvysakh
andauthored
Updated error message (actions#1351)
Co-authored-by: lmvysakh <lmvysakh@github.com>
1 parent 66fcabf commit 751276e

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎__tests__/cache-restore.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
276276
await expect(cacheDistributor.restoreCache()).rejects.toThrow(
277277
`No file in ${process.cwd()} matched to [${cacheDependencyPath
278278
.split('\n')
279-
.join(',')}], make sure you have checked out the target repository`
279+
.join(
280+
','
281+
)}] for ${packageManager}. Make sure you have checked out the target repository, or consider removing the cache step if there are no dependencies to cache.`
280282
);
281283
}
282284
);

‎dist/cache-save/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98098,7 +98098,7 @@ class CacheDistributor {
9809898098
.split('\n')
9809998099
.join(',')} or ${CACHE_DEPENDENCY_BACKUP_PATH}`
9810098100
: this.cacheDependencyPath.split('\n').join(',');
98101-
throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`);
98101+
throw new Error(`No file in ${process.cwd()} matched to [${file}] for ${this.packageManager}. Make sure you have checked out the target repository, or consider removing the cache step if there are no dependencies to cache.`);
9810298102
}
9810398103
const cachePath = await this.getCacheGlobalDirectories();
9810498104
core.saveState(State.CACHE_PATHS, cachePath);

‎dist/setup/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103351,7 +103351,7 @@ class CacheDistributor {
103351103351
.split('\n')
103352103352
.join(',')} or ${CACHE_DEPENDENCY_BACKUP_PATH}`
103353103353
: this.cacheDependencyPath.split('\n').join(',');
103354-
throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`);
103354+
throw new Error(`No file in ${process.cwd()} matched to [${file}] for ${this.packageManager}. Make sure you have checked out the target repository, or consider removing the cache step if there are no dependencies to cache.`);
103355103355
}
103356103356
const cachePath = await this.getCacheGlobalDirectories();
103357103357
saveState(State.CACHE_PATHS, cachePath);

‎src/cache-distributions/cache-distributor.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ abstract class CacheDistributor {
6060
.join(',')} or ${CACHE_DEPENDENCY_BACKUP_PATH}`
6161
: this.cacheDependencyPath.split('\n').join(',');
6262
throw new Error(
63-
`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`
63+
`No file in ${process.cwd()} matched to [${file}] for ${this.packageManager}. Make sure you have checked out the target repository, or consider removing the cache step if there are no dependencies to cache.`
6464
);
6565
}
6666

0 commit comments

Comments
 (0)