fix(stack): normalize stack name only for libcompose (#301)

* normalize stack name only for libcompose

* reformat and cleanup

Co-authored-by: Dmitry Salakhov <to@dimasalakhov.com>
This commit is contained in:
Hui
2021-05-04 04:11:34 +12:00
committed by GitHub
parent 4444de1971
commit dc86024078
4 changed files with 50 additions and 38 deletions

View File

@@ -77,6 +77,11 @@ func (w *ComposeStackManager) Down(stack *portainer.Stack, endpoint *portainer.E
return err
}
// NormalizeStackName returns the passed stack name, for interface implementation only
func (w *ComposeStackManager) NormalizeStackName(name string) string {
return name
}
func stackFilePath(stack *portainer.Stack) string {
return path.Join(stack.ProjectPath, stack.EntryPoint)
}