Skip to content

Commit 33688c4

Browse files
authored
Merge pull request #319 from crazy-max/buildx-builder-current
buildx: make name opt optional when inspecting builder
2 parents 5bbaf90 + f549f79 commit 33688c4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/buildx/builder.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class Builder {
5555
return ok;
5656
}
5757

58-
public async inspect(name: string): Promise<BuilderInfo> {
58+
public async inspect(name?: string): Promise<BuilderInfo> {
5959
// always enable debug for inspect command, so we can display additional
6060
// fields such as features: https://github.com/docker/buildx/pull/1854
6161
const envs = Object.assign({}, process.env, {
@@ -64,7 +64,12 @@ export class Builder {
6464
[key: string]: string;
6565
};
6666

67-
const cmd = await this.buildx.getCommand(['inspect', name]);
67+
const args = ['inspect'];
68+
if (name) {
69+
args.push(name);
70+
}
71+
72+
const cmd = await this.buildx.getCommand(args);
6873
return await Exec.getExecOutput(cmd.command, cmd.args, {
6974
ignoreReturnCode: true,
7075
silent: true,

0 commit comments

Comments
 (0)