mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 18:13:42 +08:00 
			
		
		
		
	rm: display name of removed builder
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		@@ -2,6 +2,7 @@ package commands
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"context"
 | 
						"context"
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/docker/buildx/store"
 | 
						"github.com/docker/buildx/store"
 | 
				
			||||||
@@ -73,7 +74,12 @@ func runRm(dockerCli command.Cli, in rmOptions) error {
 | 
				
			|||||||
	if err := txn.Remove(ng.Name); err != nil {
 | 
						if err := txn.Remove(ng.Name); err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return err1
 | 
						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 {
 | 
					func rmCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
 | 
				
			||||||
@@ -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 {
 | 
										if err := txn.Remove(b.ng.Name); err != nil {
 | 
				
			||||||
						return err
 | 
											return err
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										_, _ = fmt.Fprintf(dockerCli.Err(), "%s removed\n", b.ng.Name)
 | 
				
			||||||
					return rmerr
 | 
										return rmerr
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				return nil
 | 
									return nil
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user