mirror of
https://github.com/actions/setup-java.git
synced 2025-05-21 18:01:46 +00:00
add error handling
This commit is contained in:
parent
f69f00b5e5
commit
b01c6d1cb0
133320
dist/setup/index.js
vendored
133320
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) {
|
||||
core.setFailed(error.message);
|
||||
if (error.name === ValidationError.name) {
|
||||
core.setFailed(error.message);
|
||||
} else {
|
||||
core.warning(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user