diff --git a/dist/index.js b/dist/index.js index 621487e1a..ead03d6ab 100644 --- a/dist/index.js +++ b/dist/index.js @@ -152,7 +152,7 @@ function getVersion() { if (res.stderr.length > 0 && res.exitCode != 0) { throw new Error(res.stderr.trim()); } - return parseVersion(res.stdout); + return parseVersion(res.stdout.trim()); }); }); } @@ -473,7 +473,7 @@ function run() { }) .then(res => { if (res.stderr.length > 0 && res.exitCode != 0) { - throw new Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)[0].trim()}`); + throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)[0].trim()}`); } }); const imageID = yield buildx.getImageID(); diff --git a/src/buildx.ts b/src/buildx.ts index d624b6b9d..116fd2afa 100644 --- a/src/buildx.ts +++ b/src/buildx.ts @@ -103,7 +103,7 @@ export async function getVersion(): Promise { if (res.stderr.length > 0 && res.exitCode != 0) { throw new Error(res.stderr.trim()); } - return parseVersion(res.stdout); + return parseVersion(res.stdout.trim()); }); } diff --git a/src/main.ts b/src/main.ts index 3453c5338..4b6af66f3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,7 +29,7 @@ async function run(): Promise { }) .then(res => { if (res.stderr.length > 0 && res.exitCode != 0) { - throw new Error(`buildx bake failed with: ${res.stderr.match(/(.*)\s*$/)![0].trim()}`); + throw new Error(`buildx failed with: ${res.stderr.match(/(.*)\s*$/)![0].trim()}`); } });