mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 15:03:08 +02:00
fix: sort multiple config files
`globSync` doesn't guarantee the order in which it returns the matching paths, so without the `sort()`, the config files may be merged differently each time the server is started
This commit is contained in:
parent
7b04c6ade4
commit
8bc77072cb
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ export function loadConfig(): Config {
|
|||
JSON.parse(fs.readFileSync(`${_dirname}/../../../built/_vite_/manifest.json`, 'utf-8'))
|
||||
: { 'src/_boot_.ts': { file: 'src/_boot_.ts' } };
|
||||
|
||||
const config = globSync(path)
|
||||
const config = globSync(path).sort()
|
||||
.map(path => fs.readFileSync(path, 'utf-8'))
|
||||
.map(contents => yaml.load(contents) as Source)
|
||||
.reduce(
|
||||
|
|
Loading…
Reference in a new issue