Skip to content

Commit 70d3d9a

Browse files
committed
builder: enable debug for inspect cmd to display additional fields
Signed-off-by: CrazyMax <[email protected]>
1 parent 9436c6c commit 70d3d9a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/buildx/builder.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,19 @@ export class Builder {
5656
}
5757

5858
public async inspect(name: string): Promise<BuilderInfo> {
59+
// always enable debug for inspect command, so we can display additional
60+
// fields such as features: https://github.com/docker/buildx/pull/1854
61+
const envs = Object.assign({}, process.env, {
62+
DEBUG: '1'
63+
}) as {
64+
[key: string]: string;
65+
};
66+
5967
const cmd = await this.buildx.getCommand(['inspect', name]);
6068
return await Exec.getExecOutput(cmd.command, cmd.args, {
6169
ignoreReturnCode: true,
62-
silent: true
70+
silent: true,
71+
env: envs
6372
}).then(res => {
6473
if (res.stderr.length > 0 && res.exitCode != 0) {
6574
throw new Error(res.stderr.trim());

0 commit comments

Comments
 (0)