Log config sources and allow other file extensions

This commit is contained in:
Jamie Kyle 2024-03-12 09:35:52 -07:00 committed by GitHub
parent 8387f938eb
commit 0482c15852
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

2
.gitignore vendored
View file

@ -8,7 +8,7 @@ stylesheets/*.css.map
/dist
.DS_Store
config/local.json
config/local-*.json
config/local-*
*.provisionprofile
release/
/dev-app-update.yml

View file

@ -1,7 +1,7 @@
// Copyright 2017 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { join } from 'path';
import { join, basename } from 'path';
import { app } from 'electron';
import type { IConfig } from 'config';
@ -44,6 +44,12 @@ if (getEnvironment() === Environment.Production) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const config: IConfig = require('config');
if (getEnvironment() !== Environment.Production) {
config.util.getConfigSources().forEach(source => {
console.log(`config: Using config source ${basename(source.name)}`);
});
}
// Log resulting env vars in use by config
[
'NODE_ENV',