Merge pull request #7 from overleaf/jpa-fix-defaults-path

[misc] fix path to app config/ dir following the renaming of the package
This commit is contained in:
Jakob Ackermann 2021-07-06 16:36:07 +02:00 committed by GitHub
commit 51dc1c437a
2 changed files with 4 additions and 4 deletions

View file

@ -4,7 +4,7 @@ const path = require("path");
const env = (process.env.NODE_ENV || "development").toLowerCase(); const env = (process.env.NODE_ENV || "development").toLowerCase();
const { merge } = require('./merge'); const { merge } = require('./merge');
const defaultSettingsPath = path.normalize(__dirname + "/../../config/settings.defaults"); const defaultSettingsPath = path.normalize(__dirname + "/../../../config/settings.defaults");
if (fs.existsSync(`${defaultSettingsPath}.js`)) { if (fs.existsSync(`${defaultSettingsPath}.js`)) {
console.log(`Using default settings from ${defaultSettingsPath}.js`); console.log(`Using default settings from ${defaultSettingsPath}.js`);
@ -23,10 +23,10 @@ if (process.env.SHARELATEX_CONFIG) {
} else { } else {
possibleConfigFiles = [ possibleConfigFiles = [
process.cwd() + `/config/settings.${env}.js`, process.cwd() + `/config/settings.${env}.js`,
path.normalize(__dirname + `/../../config/settings.${env}.js`), path.normalize(__dirname + `/../../../config/settings.${env}.js`),
// TODO: remove these in the next major version // TODO: remove these in the next major version
process.cwd() + `/config/settings.${env}.coffee`, process.cwd() + `/config/settings.${env}.coffee`,
path.normalize(__dirname + `/../../config/settings.${env}.coffee`) path.normalize(__dirname + `/../../../config/settings.${env}.coffee`)
]; ];
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@overleaf/settings", "name": "@overleaf/settings",
"description": "A centralised settings system for Overleaf", "description": "A centralised settings system for Overleaf",
"version": "2.1.0", "version": "2.1.1",
"repository": "overleaf/settings-module" "repository": "overleaf/settings-module"
} }