Skip to content

Commit

Permalink
builder: enable debug for inspect cmd to display additional fields
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Mar 12, 2024
1 parent 9436c6c commit 70d3d9a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/buildx/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,19 @@ export class Builder {
}

public async inspect(name: string): Promise<BuilderInfo> {
// always enable debug for inspect command, so we can display additional
// fields such as features: https://github.com/docker/buildx/pull/1854
const envs = Object.assign({}, process.env, {
DEBUG: '1'
}) as {
[key: string]: string;
};

const cmd = await this.buildx.getCommand(['inspect', name]);
return await Exec.getExecOutput(cmd.command, cmd.args, {
ignoreReturnCode: true,
silent: true
silent: true,
env: envs
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.trim());
Expand Down

0 comments on commit 70d3d9a

Please sign in to comment.