We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9336afa commit b4045afCopy full SHA for b4045af
internal/devconfig/configfile/env.go
@@ -26,7 +26,12 @@ func (c *ConfigFile) ParseEnvsFromDotEnv() (map[string]string, error) {
26
if !c.IsdotEnvEnabled() {
27
return nil, fmt.Errorf("env file does not have a .env extension")
28
}
29
- envFileAbsPath := path.Join(filepath.Dir(c.AbsRootPath), c.EnvFrom)
+ envFileAbsPath := filepath.Dir(c.AbsRootPath)
30
+ if filepath.IsAbs(c.EnvFrom) {
31
+ envFileAbsPath = path.Join(envFileAbsPath, path.Base(c.EnvFrom))
32
+ } else {
33
+ envFileAbsPath = path.Join(envFileAbsPath, c.EnvFrom)
34
+ }
35
file, err := os.Open(envFileAbsPath)
36
if err != nil {
37
return nil, fmt.Errorf("failed to open file: %s", envFileAbsPath)
0 commit comments