Skip to content

Commit a5b683b

Browse files
authored
Merge pull request #111 from crazy-max/fix-buildx-build-err
buildx(install): throw error on failed build
2 parents 0b166c6 + e072607 commit a5b683b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/buildx/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class Install {
8686
ignoreReturnCode: true
8787
}).then(res => {
8888
if (res.stderr.length > 0 && res.exitCode != 0) {
89-
core.warning(res.stderr.trim());
89+
throw new Error(`build failed with: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`);
9090
}
9191
return tc.cacheFile(`${outputDir}/buildx`, os.platform() == 'win32' ? 'docker-buildx.exe' : 'docker-buildx', 'buildx', vspec, this.platform());
9292
});

0 commit comments

Comments
 (0)