@dotenvx/dotenvx
Advanced tools
Comparing version 0.8.2 to 0.8.3
{ | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"name": "@dotenvx/dotenvx", | ||
@@ -4,0 +4,0 @@ "description": "a better dotenv–from the creator of `dotenv`", |
@@ -112,5 +112,6 @@ const fs = require('fs') | ||
const guessEnvironment = function (file) { | ||
const splitFile = file.split('.') | ||
const possibleEnvironment = splitFile[2] // ['', 'env', environment'] | ||
const guessEnvironment = function (filepath) { | ||
const filename = path.basename(filepath) | ||
const parts = filename.split('.') | ||
const possibleEnvironment = parts[2] // ['', 'env', environment', 'previous'] | ||
@@ -117,0 +118,0 @@ if (!possibleEnvironment || possibleEnvironment.length === 0) { |
46133
1058