Skip to content

Commit aa85b10

Browse files
committed
Ignore .env dirs when infered
Signed-off-by: Ulysses Souza <[email protected]>
1 parent 162cc24 commit aa85b10

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)