mirror of
https://github.com/actions/cache.git
synced 2025-04-21 03:26:46 +00:00
Remove validation failures and warning annotations (#108)
* Update warnings behavior * Add void return type
This commit is contained in:
parent
639f9d8b81
commit
95c1798369
8 changed files with 82 additions and 40 deletions
|
@ -10,13 +10,14 @@ async function run(): Promise<void> {
|
|||
try {
|
||||
// Validate inputs, this can cause task failure
|
||||
if (!utils.isValidEvent()) {
|
||||
core.setFailed(
|
||||
utils.logWarning(
|
||||
`Event Validation Error: The event type ${
|
||||
process.env[Events.Key]
|
||||
} is not supported. Only ${utils
|
||||
.getSupportedEvents()
|
||||
.join(", ")} events are supported at this time.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const cachePath = utils.resolvePath(
|
||||
|
@ -118,7 +119,7 @@ async function run(): Promise<void> {
|
|||
`Cache restored from key: ${cacheEntry && cacheEntry.cacheKey}`
|
||||
);
|
||||
} catch (error) {
|
||||
core.warning(error.message);
|
||||
utils.logWarning(error.message);
|
||||
utils.setCacheHitOutput(false);
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue