From fb6e26a302965e69a6761e6f19968682ef500c6f Mon Sep 17 00:00:00 2001 From: matias-portainer <104775949+matias-portainer@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:34:57 -0300 Subject: [PATCH] fix(stacks): pass WorkingDir to deployer command EE-5142 (#8615) --- api/exec/compose_stack.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/exec/compose_stack.go b/api/exec/compose_stack.go index dd84bd6a2..bd9985cd4 100644 --- a/api/exec/compose_stack.go +++ b/api/exec/compose_stack.go @@ -82,9 +82,11 @@ func (manager *ComposeStackManager) Down(ctx context.Context, stack *portainer.S } err = manager.deployer.Remove(ctx, stack.Name, nil, libstack.Options{ + WorkingDir: stack.ProjectPath, EnvFilePath: envFilePath, Host: url, }) + return errors.Wrap(err, "failed to remove a stack") }