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 1ec15d9 commit 9336afaCopy full SHA for 9336afa
internal/devconfig/configfile/env.go
@@ -3,6 +3,7 @@ package configfile
3
import (
4
"fmt"
5
"os"
6
+ "path"
7
"path/filepath"
8
9
"github.com/hashicorp/go-envparse"
@@ -25,10 +26,10 @@ func (c *ConfigFile) ParseEnvsFromDotEnv() (map[string]string, error) {
25
26
if !c.IsdotEnvEnabled() {
27
return nil, fmt.Errorf("env file does not have a .env extension")
28
}
-
29
- file, err := os.Open(c.EnvFrom)
+ envFileAbsPath := path.Join(filepath.Dir(c.AbsRootPath), c.EnvFrom)
30
+ file, err := os.Open(envFileAbsPath)
31
if err != nil {
- return nil, fmt.Errorf("failed to open file: %s", c.EnvFrom)
32
+ return nil, fmt.Errorf("failed to open file: %s", envFileAbsPath)
33
34
defer file.Close()
35
0 commit comments