mirror of
https://github.com/docker/build-push-action.git
synced 2026-09-15 02:07:16 +08:00
Merge pull request #1620 from crazy-max/buildx-error-message
use the shared Buildx error summary helper
This commit is contained in:
commit
379bf63a97
22
dist/index.cjs
generated
vendored
22
dist/index.cjs
generated
vendored
File diff suppressed because one or more lines are too long
6
dist/index.cjs.map
generated
vendored
6
dist/index.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -110,11 +110,11 @@ actionsToolkit.run(
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.exitCode != 0) {
|
if (res.exitCode != 0) {
|
||||||
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
|
if (inputs.call && inputs.call === 'check' && res.stdout.length > 0) {
|
||||||
// checks warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
|
// Check warnings are printed to stdout: https://github.com/docker/buildx/pull/2647
|
||||||
// take the first line with the message summaryzing the warnings
|
// Use the first line as the warning summary.
|
||||||
err = new Error(res.stdout.split('\n')[0]?.trim());
|
err = new Error(res.stdout.split('\n')[0]?.trim());
|
||||||
} else if (res.stderr.length > 0) {
|
} else {
|
||||||
err = new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
|
err = new Error(`buildx failed with: ${Buildx.getErrorMessage(res.stderr)}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user