Fix relative paths on envfile label

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2022-04-28 07:29:05 +02:00 committed by Nicolas De loof
parent 41b3967cb5
commit 69e21d89f0
1 changed files with 4 additions and 1 deletions

View File

@ -169,7 +169,10 @@ func (o *projectOptions) toProject(services []string, po ...cli.ProjectOptionsFn
ef := o.EnvFile
if ef != "" && !filepath.IsAbs(ef) {
ef = filepath.Join(project.WorkingDir, o.EnvFile)
ef, err = filepath.Abs(ef)
if err != nil {
return nil, err
}
}
for i, s := range project.Services {
s.CustomLabels = map[string]string{