mirror of
https://github.com/gradle/wrapper-validation-action
synced 2024-11-23 17:22:01 +00:00
Merge branch 'releases/v2'
* releases/v2: Check dist on release branches Log multiple errors
This commit is contained in:
commit
24d65a10ac
3 changed files with 14 additions and 2 deletions
1
.github/workflows/check-dist.yml
vendored
1
.github/workflows/check-dist.yml
vendored
|
@ -9,6 +9,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
- releases/**
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
|
|
8
dist/index.js
vendored
8
dist/index.js
vendored
|
@ -28050,7 +28050,13 @@ async function run() {
|
|||
}
|
||||
}
|
||||
catch (error) {
|
||||
if (error instanceof Error) {
|
||||
if (error instanceof AggregateError) {
|
||||
core.setFailed(`Multiple errors returned`);
|
||||
for (const err of error.errors) {
|
||||
core.error(`Error ${error.errors.indexOf(err)}: ${err.message}`);
|
||||
}
|
||||
}
|
||||
else if (error instanceof Error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -25,7 +25,12 @@ export async function run(): Promise<void> {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
if (error instanceof AggregateError) {
|
||||
core.setFailed(`Multiple errors returned`)
|
||||
for (const err of error.errors) {
|
||||
core.error(`Error ${error.errors.indexOf(err)}: ${err.message}`)
|
||||
}
|
||||
} else if (error instanceof Error) {
|
||||
core.setFailed(error.message)
|
||||
} else {
|
||||
core.setFailed(`Unknown object was thrown: ${error}`)
|
||||
|
|
Loading…
Reference in a new issue