mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
Fix config file not being loaded from the project root by default (#249)
This commit is contained in:
@@ -34,8 +34,14 @@ if (process.env.ACTUAL_CONFIG_PATH) {
|
||||
);
|
||||
userConfig = parseJSON(process.env.ACTUAL_CONFIG_PATH);
|
||||
} else {
|
||||
debug(`loading config from default path: '${defaultDataDir}/config.json'`);
|
||||
userConfig = parseJSON(path.join(defaultDataDir, 'config.json'), true);
|
||||
let configFile = path.join(projectRoot, 'config.json');
|
||||
|
||||
if (!fs.existsSync(configFile)) {
|
||||
configFile = path.join(defaultDataDir, 'config.json');
|
||||
}
|
||||
|
||||
debug(`loading config from default path: '${configFile}'`);
|
||||
userConfig = parseJSON(configFile, true);
|
||||
}
|
||||
|
||||
/** @type {Omit<import('./config-types.js').Config, 'mode' | 'serverFiles' | 'userFiles'>} */
|
||||
|
||||
6
upcoming-release-notes/249.md
Normal file
6
upcoming-release-notes/249.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [UnexomWid]
|
||||
---
|
||||
|
||||
Fix config file not being loaded from the project root by default
|
||||
Reference in New Issue
Block a user