Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 25, 2021
1 parent 2d4f2f5 commit 1aca2f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/core-common/src/utils/has-dotenv.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import fs from 'fs';
import path from 'path';

// https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
const DOTENV_FILE = path.join('.', '.env');

/**
* Is there a .env file in the current directory?
*
* This is the default behavior of `dotenv-webpack-plugin`
* https://github.com/mrsteele/dotenv-webpack/blob/master/src/index.js#L34
*/
export const hasDotenv = () => fs.existsSync(DOTENV_FILE);
export const hasDotenv = () => fs.existsSync(path.join('.', '.env'));

0 comments on commit 1aca2f1

Please sign in to comment.