fix(compose): avoid the need to pass the file to remove the stack BE-11057

pull/12064/head
andres-portainer 2024-07-31 11:40:40 -03:00
parent a63bd2cea4
commit 269a5573f8
1 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ func (wrapper *PluginWrapper) Deploy(ctx context.Context, filePaths []string, op
// Down stop and remove containers
func (wrapper *PluginWrapper) Remove(ctx context.Context, projectName string, filePaths []string, options libstack.Options) error {
output, err := wrapper.command(newDownCommand(projectName, filePaths), options)
output, err := wrapper.command(newDownCommand(projectName), options)
if len(output) != 0 {
if err != nil {
return err
@ -212,8 +212,8 @@ func newUpCommand(filePaths []string, options upOptions) composeCommand {
return newCommand(args, filePaths)
}
func newDownCommand(projectName string, filePaths []string) composeCommand {
cmd := newCommand([]string{"down", "--remove-orphans"}, filePaths)
func newDownCommand(projectName string) composeCommand {
cmd := newCommand([]string{"down", "--remove-orphans"}, nil)
cmd.WithProjectName(projectName)
return cmd