Skip to content

Commit

Permalink
Updating to fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pbaum83 committed Jan 6, 2021
1 parent 220a04e commit 5b86003
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ import {banner} from './banner';
import dotenv from 'dotenv';
import path from 'path';

if( process.env.npm_config_conf ) {
if (existsSync(path.resolve(__dirname, '../' + process.env.npm_config_conf))) {
dotenv.config({path: path.resolve(__dirname, '../' + process.env.npm_config_conf)});
} else {
dotenv.config({path: path.resolve(__dirname, '../.env')});
}
if (process.env.npm_config_conf) {
if (
existsSync(path.resolve(__dirname, '../' + process.env.npm_config_conf))
) {
dotenv.config({
path: path.resolve(__dirname, '../' + process.env.npm_config_conf)
});
} else {
dotenv.config({path: path.resolve(__dirname, '../.env')});
}
} else if (existsSync(path.resolve(__dirname, '../dotenv'))) {
dotenv.config({path: path.resolve(__dirname, '../dotenv')});
} else {
if (existsSync(path.resolve(__dirname, '../dotenv'))) {
dotenv.config({path: path.resolve(__dirname, '../dotenv')});
} else {
dotenv.config({path: path.resolve(__dirname, '../.env')});
}
dotenv.config({path: path.resolve(__dirname, '../.env')});
}

console.info(
Expand Down

0 comments on commit 5b86003

Please sign in to comment.