Fix progress writer network creation and removal

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2021-04-19 17:27:10 -03:00
parent 66f90098cd
commit 0fbeedfb6e
1 changed files with 2 additions and 2 deletions

View File

@ -930,7 +930,7 @@ func (s *composeService) ensureNetwork(ctx context.Context, n types.NetworkConfi
}
createOpts.IPAM.Config = append(createOpts.IPAM.Config, config)
}
networkEventName := fmt.Sprintf("Network %q", n.Name)
networkEventName := fmt.Sprintf("Network %s", n.Name)
w := progress.ContextWriter(ctx)
w.Event(progress.CreatingEvent(networkEventName))
if _, err := s.apiClient.NetworkCreate(ctx, n.Name, createOpts); err != nil {
@ -947,7 +947,7 @@ func (s *composeService) ensureNetwork(ctx context.Context, n types.NetworkConfi
func (s *composeService) ensureNetworkDown(ctx context.Context, networkID string, networkName string) error {
w := progress.ContextWriter(ctx)
eventName := fmt.Sprintf("Network %q", networkName)
eventName := fmt.Sprintf("Network %s", networkName)
w.Event(progress.RemovingEvent(eventName))
if err := s.apiClient.NetworkRemove(ctx, networkID); err != nil {