فهرست منبع

Fix relative paths on envfile label

Signed-off-by: Ulysses Souza <[email protected]>
Ulysses Souza 3 سال پیش
والد
کامیت
69e21d89f0
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      cmd/compose/compose.go

+ 4 - 1
cmd/compose/compose.go

@@ -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{