diff --git a/src/main.ts b/src/main.ts index 3f64d44..f51e40f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -166,8 +166,8 @@ actionsToolkit.run( // if there are no warnings found, return the first line of stdout err = Error(res.stdout.split('\n')[0]?.trim()); } - } else if (res.stderr.length > 0) { - err = Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); + } else { + err = Error(`buildx bake failed with: ${Buildx.getErrorMessage(res.stderr)}`); } } });