From f549f7954e52f8460040592bc2db69ab35feda8e Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:10:44 +0200 Subject: [PATCH] buildx: make name opt optional when inspecting builder Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- src/buildx/builder.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/buildx/builder.ts b/src/buildx/builder.ts index 98a7082..d30b75e 100644 --- a/src/buildx/builder.ts +++ b/src/buildx/builder.ts @@ -55,7 +55,7 @@ export class Builder { return ok; } - public async inspect(name: string): Promise { + public async inspect(name?: string): Promise { // 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, { @@ -64,7 +64,12 @@ export class Builder { [key: string]: string; }; - const cmd = await this.buildx.getCommand(['inspect', name]); + const args = ['inspect']; + if (name) { + args.push(name); + } + + const cmd = await this.buildx.getCommand(args); return await Exec.getExecOutput(cmd.command, cmd.args, { ignoreReturnCode: true, silent: true,