Merge pull request #7102 from overleaf/msm-check-entry-point-dir-settings

[settings] add check for `process.argv[1]`

GitOrigin-RevId: 24e9e02dc840e9c4206d36b814150b092247d5d9
This commit is contained in:
Miguel Serrano 2022-03-24 13:29:11 +01:00 committed by Copybot
parent f5654e94c6
commit 7e41fbf81b

View file

@ -4,7 +4,9 @@ const Path = require('path')
const { merge } = require('./merge') const { merge } = require('./merge')
const CWD = process.cwd() const CWD = process.cwd()
const ENTRY_POINT_DIR = Path.dirname(process.argv[1]) const ENTRY_POINT_DIR = process.argv[1]
? Path.dirname(process.argv[1])
: undefined
const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase() const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase()
const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG