Skip to content

Commit ad6e42f

Browse files
authored
Merge pull request #193 from compose-spec/ignore-dotenv-dir
2 parents 162cc24 + aa85b10 commit ad6e42f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/options.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ func WithDotEnv(o *ProjectOptions) error {
206206
}
207207

208208
if s.IsDir() {
209-
if o.EnvFile != "" {
210-
return errors.Errorf("%s is a directory", dotEnvFile)
209+
if o.EnvFile == "" {
210+
return nil
211211
}
212+
return errors.Errorf("%s is a directory", dotEnvFile)
212213
}
213214

214215
file, err := os.Open(dotEnvFile)

0 commit comments

Comments
 (0)