mirror of
https://github.com/actions/setup-java.git
synced 2025-04-20 18:06:45 +00:00
add error handling
This commit is contained in:
parent
f69f00b5e5
commit
b01c6d1cb0
2 changed files with 66669 additions and 66658 deletions
133340
dist/setup/index.js
vendored
133340
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
import * as core from '@actions/core';
|
||||
import { ValidationError } from '@actions/cache';
|
||||
import * as auth from './auth';
|
||||
import { getBooleanInput } from './util';
|
||||
import * as constants from './constants';
|
||||
|
@ -46,7 +47,11 @@ async function run() {
|
|||
await restore(cache);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.name === ValidationError.name) {
|
||||
core.setFailed(error.message);
|
||||
} else {
|
||||
core.warning(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue