|
|
@@ -44,7 +44,7 @@ func downCommand(p *ProjectOptions, backend api.Service) *cobra.Command {
|
|
|
ProjectOptions: p,
|
|
|
}
|
|
|
downCmd := &cobra.Command{
|
|
|
- Use: "down [OPTIONS]",
|
|
|
+ Use: "down [OPTIONS] [SERVICES]",
|
|
|
Short: "Stop and remove containers, networks",
|
|
|
PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
|
|
|
opts.timeChanged = cmd.Flags().Changed("timeout")
|
|
|
@@ -56,9 +56,8 @@ func downCommand(p *ProjectOptions, backend api.Service) *cobra.Command {
|
|
|
return nil
|
|
|
}),
|
|
|
RunE: Adapt(func(ctx context.Context, args []string) error {
|
|
|
- return runDown(ctx, backend, opts)
|
|
|
+ return runDown(ctx, backend, opts, args)
|
|
|
}),
|
|
|
- Args: cobra.NoArgs,
|
|
|
ValidArgsFunction: noCompletion(),
|
|
|
}
|
|
|
flags := downCmd.Flags()
|
|
|
@@ -77,7 +76,7 @@ func downCommand(p *ProjectOptions, backend api.Service) *cobra.Command {
|
|
|
return downCmd
|
|
|
}
|
|
|
|
|
|
-func runDown(ctx context.Context, backend api.Service, opts downOptions) error {
|
|
|
+func runDown(ctx context.Context, backend api.Service, opts downOptions, services []string) error {
|
|
|
project, name, err := opts.projectOrName()
|
|
|
if err != nil {
|
|
|
return err
|
|
|
@@ -94,5 +93,6 @@ func runDown(ctx context.Context, backend api.Service, opts downOptions) error {
|
|
|
Timeout: timeout,
|
|
|
Images: opts.images,
|
|
|
Volumes: opts.volumes,
|
|
|
+ Services: services,
|
|
|
})
|
|
|
}
|