fix: .env backwards compatibility

This commit is contained in:
Jef LeCompte
2020-12-11 08:11:57 -05:00
parent 7e3020a927
commit 9b7c7e2881
+2 -3
View File
@@ -1,10 +1,9 @@
import {existsSync, readFileSync} from 'fs';
import {banner} from './banner';
import dotenv from 'dotenv';
import path from 'path';
import {readFileSync} from 'fs';
if (path.resolve(__dirname, '../dotenv').length > 0) {
if (existsSync(path.resolve(__dirname, '../dotenv'))) {
dotenv.config({path: path.resolve(__dirname, '../dotenv')});
} else {
dotenv.config({path: path.resolve(__dirname, '../.env')});