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
3
3
import (
4
4
"fmt"
5
5
"os"
6
- "path"
7
6
"path/filepath"
8
7
9
8
"github.com/hashicorp/go-envparse"
@@ -26,11 +25,10 @@ func (c *ConfigFile) ParseEnvsFromDotEnv() (map[string]string, error) {
26
25
if ! c .IsdotEnvEnabled () {
27
26
return nil , fmt .Errorf ("env file does not have a .env extension" )
28
27
}
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 )
32
31
}
33
- envFileAbsPath := path .Join (filepath .Dir (c .AbsRootPath ), c .EnvFrom )
34
32
file , err := os .Open (envFileAbsPath )
35
33
if err != nil {
36
34
return nil , fmt .Errorf ("failed to open file: %s" , envFileAbsPath )
You can’t perform that action at this time.
0 commit comments