File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
internal/devconfig/configfile Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package configfile
33import (
44 "fmt"
55 "os"
6- "path"
76 "path/filepath"
87
98 "github.com/hashicorp/go-envparse"
@@ -26,11 +25,10 @@ func (c *ConfigFile) ParseEnvsFromDotEnv() (map[string]string, error) {
2625 if ! c .IsdotEnvEnabled () {
2726 return nil , fmt .Errorf ("env file does not have a .env extension" )
2827 }
29- // We don't allow absolute path for env_from as it breaks reproducibility
30- if filepath .IsAbs (c .EnvFrom ) {
31- return nil , fmt . Errorf ( "`env_from` field can't take an absolute path" )
28+ envFileAbsPath := c . EnvFrom
29+ if ! filepath .IsAbs (c .EnvFrom ) {
30+ envFileAbsPath = filepath . Join ( filepath . Dir ( c . AbsRootPath ), c . EnvFrom )
3231 }
33- envFileAbsPath := path .Join (filepath .Dir (c .AbsRootPath ), c .EnvFrom )
3432 file , err := os .Open (envFileAbsPath )
3533 if err != nil {
3634 return nil , fmt .Errorf ("failed to open file: %s" , envFileAbsPath )
You can’t perform that action at this time.
0 commit comments