mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #6928 from overleaf/msm-fix-config-lookup-ce
[settings] use entry point file to locate config GitOrigin-RevId: 7e860233619a8c51929ca9d363e0a82454cd0c2a
This commit is contained in:
parent
f8988e8087
commit
e9a4ae027d
1 changed files with 4 additions and 1 deletions
|
@ -4,12 +4,15 @@ const Path = require('path')
|
|||
const { merge } = require('./merge')
|
||||
|
||||
const CWD = process.cwd()
|
||||
const ENTRY_POINT_DIR = Path.dirname(process.argv[1])
|
||||
const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase()
|
||||
const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG
|
||||
|
||||
let settings
|
||||
let settingsExist = false
|
||||
const defaultsPath = pathIfExists(Path.join(CWD, 'config/settings.defaults.js'))
|
||||
const defaultsPath =
|
||||
pathIfExists(Path.join(CWD, 'config/settings.defaults.js')) ||
|
||||
pathIfExists(Path.join(ENTRY_POINT_DIR, 'config/settings.defaults.js'))
|
||||
if (defaultsPath) {
|
||||
console.log(`Using default settings from ${defaultsPath}`)
|
||||
settings = require(defaultsPath)
|
||||
|
|
Loading…
Reference in a new issue