Skip to content

Commit 24caaf8

Browse files
committed
Lint fix
1 parent 6dbef33 commit 24caaf8

File tree

1 file changed

+1
-3
lines changed
  • internal/devconfig/configfile

1 file changed

+1
-3
lines changed

internal/devconfig/configfile/env.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ func (c *ConfigFile) ParseEnvsFromDotEnv() (map[string]string, error) {
2626
if !c.IsdotEnvEnabled() {
2727
return nil, fmt.Errorf("env file does not have a .env extension")
2828
}
29-
envFileAbsPath := filepath.Dir(c.AbsRootPath)
3029
// We don't allow absolute path for env_from as it breaks reproducibility
3130
if filepath.IsAbs(c.EnvFrom) {
3231
return nil, fmt.Errorf("`env_from` field can't take an absolute path")
33-
} else {
34-
envFileAbsPath = path.Join(envFileAbsPath, c.EnvFrom)
3532
}
33+
envFileAbsPath := path.Join(filepath.Dir(c.AbsRootPath), c.EnvFrom)
3634
file, err := os.Open(envFileAbsPath)
3735
if err != nil {
3836
return nil, fmt.Errorf("failed to open file: %s", envFileAbsPath)

0 commit comments

Comments
 (0)