fix(libstack): replace filepath.Join with filesystem.JoinPaths [BE-11476] (#2655)

This commit is contained in:
Devon Steenberg
2026-05-14 13:57:29 +12:00
committed by GitHub
parent 8a22e05284
commit c9d24c3684
4 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import (
"github.com/distribution/reference"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/filesystem"
"github.com/portainer/portainer/api/logs"
"github.com/portainer/portainer/pkg/libstack"
retry "github.com/portainer/portainer/pkg/retry"
@@ -476,7 +477,7 @@ func createProject(ctx context.Context, configFilepaths []string, options libsta
for i, service := range project.Services {
for j, envFile := range service.EnvFiles {
if !filepath.IsAbs(envFile.Path) {
project.Services[i].EnvFiles[j].Path = filepath.Join(workingDir, envFile.Path)
project.Services[i].EnvFiles[j].Path = filesystem.JoinPaths(workingDir, envFile.Path)
}
}
}