We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a44cb3d + cfd735d commit 48a6adeCopy full SHA for 48a6ade
1 file changed
lib/main.js
@@ -209,7 +209,18 @@ function configDotenv (options) {
209
210
if (options) {
211
if (options.path != null) {
212
- dotenvPath = _resolveHome(options.path)
+ let envPath = options.path
213
+
214
+ if (Array.isArray(envPath)) {
215
+ for (const filepath of options.path) {
216
+ if (fs.existsSync(filepath)) {
217
+ envPath = filepath
218
+ break
219
+ }
220
221
222
223
+ dotenvPath = _resolveHome(envPath)
224
}
225
if (options.encoding != null) {
226
encoding = options.encoding
0 commit comments