Merge pull request #1412 from chaotixkilla/fix-environment-helper-to-default
Fix environment helper to use default .env path
This commit is contained in:
commit
68a52248c0
3 changed files with 3 additions and 4 deletions
|
|
@ -1,2 +1 @@
|
|||
const path = require('path')
|
||||
require('dotenv').config({ path: process.env.NODE_ENV === 'production' ? path.resolve('/etc', 'lamassu', '.env') : path.resolve(__dirname, '../.env') })
|
||||
require('dotenv').config()
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ function updateOptionBasepath (result, optionName) {
|
|||
async function run () {
|
||||
// load current opts
|
||||
const options = load().opts
|
||||
const shouldMigrate = !fs.existsSync(process.env.NODE_ENV === 'production' ? path.resolve('/etc', 'lamassu', '.env') : path.resolve(__dirname, '../.env'))
|
||||
const shouldMigrate = !fs.existsSync(path.resolve(__dirname, '../.env'))
|
||||
|
||||
// write the resulting .env
|
||||
if (shouldMigrate) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue