Merge pull request #518 from docker/fix_down_cmd

Add progress.Run to down cmd
This commit is contained in:
Guillaume Tardif 2020-08-19 17:38:06 +02:00 committed by GitHub
commit 23bb628724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/docker/api/client" "github.com/docker/api/client"
"github.com/docker/api/progress"
) )
func downCommand() *cobra.Command { func downCommand() *cobra.Command {
@ -51,9 +52,11 @@ func runDown(ctx context.Context, opts composeOptions) error {
return errors.New("compose not implemented in current context") return errors.New("compose not implemented in current context")
} }
options, err := opts.toProjectOptions() return progress.Run(ctx, func(ctx context.Context) error {
if err != nil { options, err := opts.toProjectOptions()
return err if err != nil {
} return err
return composeService.Down(ctx, options) }
return composeService.Down(ctx, options)
})
} }