1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

fix(libstack): data loss for stack with relative path [FR-437] (#559)

This commit is contained in:
Oscar Zhou 2025-03-21 09:19:31 +13:00 committed by GitHub
parent 915beecce3
commit 65e0344975
2 changed files with 6 additions and 1 deletions

View file

@ -98,6 +98,11 @@ func withComposeService(
WorkingDir: filepath.Dir(filePaths[0]),
}
if options.ProjectDir != "" {
// When relative paths are used in the compose file, the project directory is used as the base path
configDetails.WorkingDir = options.ProjectDir
}
for _, p := range filePaths {
configDetails.ConfigFiles = append(configDetails.ConfigFiles, types.ConfigFile{Filename: p})
}