Skip to content

Commit

Permalink
do not check if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
motdotla committed Feb 20, 2024
1 parent 1146910 commit 87fd887
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,10 @@ function configDotenv (options) {
let optionPathsThatExist = []
if (options && options.path) {
if (!Array.isArray(options.path)) {
if (fs.existsSync(options.path)) {
optionPathsThatExist = [_resolveHome(options.path)]
}
optionPathsThatExist = [_resolveHome(options.path)]
} else {
for (const filepath of options.path) {
if (fs.existsSync(filepath)) {
optionPathsThatExist.push(_resolveHome(filepath))
}
optionPathsThatExist.push(_resolveHome(filepath))
}
}

Expand Down

0 comments on commit 87fd887

Please sign in to comment.