Skip to content

Commit

Permalink
Fix getBuildKitVersion
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Jun 29, 2021
1 parent 2e941f2 commit 37b5f10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/buildx.ts
Expand Up @@ -191,16 +191,18 @@ export async function getBuildKitVersion(containerID: string): Promise<string> {
return exec
.getExecOutput(`docker`, ['inspect', '--format', '{{.Config.Image}}', containerID], {
ignoreReturnCode: true,
silent: true
silent: false
})
.then(bkitimage => {
core.info(`bkitimage: ${JSON.stringify(bkitimage)}`);
if (bkitimage.exitCode == 0 && bkitimage.stdout.length > 0) {
return exec
.getExecOutput(`docker`, ['run', '--rm', bkitimage.stdout, '--version'], {
ignoreReturnCode: true,
silent: true
silent: false
})
.then(bkitversion => {
core.info(`bkitversion: ${JSON.stringify(bkitversion)}`);
if (bkitversion.exitCode == 0 && bkitversion.stdout.length > 0) {
return `${bkitimage.stdout} => ${bkitversion.stdout}`;
} else if (bkitversion.stderr.length > 0) {
Expand Down

0 comments on commit 37b5f10

Please sign in to comment.