Skip to content

Commit

Permalink
ignore .env if not a file
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Apr 20, 2021
1 parent 1091323 commit da44706
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cli/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ func WithDotEnv(o *ProjectOptions) error {
}
dotEnvFile = filepath.Join(dir, dotEnvFile)
}
if _, err := os.Stat(dotEnvFile); os.IsNotExist(err) {
s, err := os.Stat(dotEnvFile)
if os.IsNotExist(err) {
return nil
}
if s.IsDir() {
return nil
}

file, err := os.Open(dotEnvFile)
if err != nil {
return err
Expand Down

0 comments on commit da44706

Please sign in to comment.