Skip to content

Commit 69e21d8

Browse files
ulyssessouzandeloof
authored andcommitted
Fix relative paths on envfile label
Signed-off-by: Ulysses Souza <[email protected]>
1 parent 41b3967 commit 69e21d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/compose/compose.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ func (o *projectOptions) toProject(services []string, po ...cli.ProjectOptionsFn
169169

170170
ef := o.EnvFile
171171
if ef != "" && !filepath.IsAbs(ef) {
172-
ef = filepath.Join(project.WorkingDir, o.EnvFile)
172+
ef, err = filepath.Abs(ef)
173+
if err != nil {
174+
return nil, err
175+
}
173176
}
174177
for i, s := range project.Services {
175178
s.CustomLabels = map[string]string{

0 commit comments

Comments
 (0)