Merge branch 'releases/v2'

* releases/v2:
  Check dist on release branches
  Log multiple errors
This commit is contained in:
daz 2024-02-06 08:25:02 -07:00
commit 24d65a10ac
No known key found for this signature in database
3 changed files with 14 additions and 2 deletions

View file

@ -9,6 +9,7 @@ on:
push: push:
branches: branches:
- main - main
- releases/**
paths-ignore: paths-ignore:
- '**.md' - '**.md'
pull_request: pull_request:

8
dist/index.js vendored
View file

@ -28050,7 +28050,13 @@ async function run() {
} }
} }
catch (error) { 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); core.setFailed(error.message);
} }
else { else {

View file

@ -25,7 +25,12 @@ export async function run(): Promise<void> {
} }
} }
} catch (error) { } 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) core.setFailed(error.message)
} else { } else {
core.setFailed(`Unknown object was thrown: ${error}`) core.setFailed(`Unknown object was thrown: ${error}`)