Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions commands/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func runInspect(ctx context.Context, dockerCli command.Cli, in inspectOptions) e
imageVerifier := policy.DefaultImageVerifier(confutil.NewConfig(dockerCli))
nodes, err := b.LoadNodes(timeoutCtx, builder.WithData(), builder.WithImageVerifier(imageVerifier))
if in.bootstrap {
var ok bool
ok, err = b.Boot(ctx)
_, err = b.Boot(ctx)
if err != nil {
return err
}
if ok {
nodes, err = b.LoadNodes(timeoutCtx, builder.WithData(), builder.WithImageVerifier(imageVerifier))
}
// Always reload. Boot() returns ok=false when it had nothing to start
// (already running, or the first LoadNodes never got DriverInfo).
// Skipping the reload leaves inspect printing stale "inactive" nodes.
nodes, err = b.LoadNodes(timeoutCtx, builder.WithData(), builder.WithImageVerifier(imageVerifier))
}

w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
Expand Down