rm: display name of removed builder

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-05-15 06:10:42 +02:00
parent 1e71a3ffa7
commit d611bbe609
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -2,6 +2,7 @@ package commands
import (
"context"
"fmt"
"time"
"github.com/docker/buildx/store"
@ -73,9 +74,14 @@ func runRm(dockerCli command.Cli, in rmOptions) error {
if err := txn.Remove(ng.Name); err != nil {
return err
}
if err1 != nil {
return err1
}
_, _ = fmt.Fprintf(dockerCli.Err(), "%s removed\n", ng.Name)
return nil
}
func rmCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
var options rmOptions
@ -158,6 +164,7 @@ func rmAllInactive(ctx context.Context, txn *store.Txn, dockerCli command.Cli, i
if err := txn.Remove(b.ng.Name); err != nil {
return err
}
_, _ = fmt.Fprintf(dockerCli.Err(), "%s removed\n", b.ng.Name)
return rmerr
}
return nil