Skip to content

Commit

Permalink
Merge pull request #124 from ndeloof/dotenv_dir
Browse files Browse the repository at this point in the history
ignore .env if not a file
  • Loading branch information
ndeloof authored Apr 20, 2021
2 parents 1091323 + da44706 commit 01e9e6b
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 01e9e6b

Please sign in to comment.