mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 18:36:46 +00:00
fix: throw error in case of no package manager file found
This commit is contained in:
parent
33dfe174e3
commit
67b74a15de
4 changed files with 7 additions and 12 deletions
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
|
@ -18976,8 +18976,7 @@ function restore(id) {
|
|||
core.debug(`primary key is ${primaryKey}`);
|
||||
core.saveState(STATE_CACHE_PRIMARY_KEY, primaryKey);
|
||||
if (primaryKey.endsWith('-')) {
|
||||
core.warning(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
|
||||
return;
|
||||
throw new Error(`No file in ${process.cwd()} matched to [${packageManager.pattern}], make sure you have checked out the target repository`);
|
||||
}
|
||||
const matchedKey = yield cache.restoreCache(packageManager.path, primaryKey, [
|
||||
`${CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${id}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue