Skip to content

Commit

Permalink
fix: .env backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jef committed Dec 11, 2020
1 parent 7e3020a commit 9b7c7e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/config.ts
@@ -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')});
Expand Down

0 comments on commit 9b7c7e2

Please sign in to comment.