fix: default to .env (#40315)
This commit is contained in:
committed by
GitHub
parent
df44da9dc2
commit
ebb4e0d5cc
@@ -1,13 +1,11 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
if (process.env.FREECODECAMP_NODE_ENV !== 'production') {
|
||||
const envPath = path.resolve(__dirname, '../.env');
|
||||
if (!fs.existsSync(envPath)) {
|
||||
throw Error('.env not found, please copy sample.env to .env.');
|
||||
}
|
||||
require('dotenv').config({ path: envPath });
|
||||
const envPath = path.resolve(__dirname, '../.env');
|
||||
if (!fs.existsSync(envPath)) {
|
||||
throw Error('.env not found, please copy sample.env to .env.');
|
||||
}
|
||||
require('dotenv').config({ path: envPath });
|
||||
|
||||
const {
|
||||
HOME_LOCATION: home,
|
||||
|
Reference in New Issue
Block a user