Log config sources and allow other file extensions
This commit is contained in:
parent
8387f938eb
commit
0482c15852
2 changed files with 8 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,7 +8,7 @@ stylesheets/*.css.map
|
||||||
/dist
|
/dist
|
||||||
.DS_Store
|
.DS_Store
|
||||||
config/local.json
|
config/local.json
|
||||||
config/local-*.json
|
config/local-*
|
||||||
*.provisionprofile
|
*.provisionprofile
|
||||||
release/
|
release/
|
||||||
/dev-app-update.yml
|
/dev-app-update.yml
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2017 Signal Messenger, LLC
|
// Copyright 2017 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { join } from 'path';
|
import { join, basename } from 'path';
|
||||||
import { app } from 'electron';
|
import { app } from 'electron';
|
||||||
|
|
||||||
import type { IConfig } from 'config';
|
import type { IConfig } from 'config';
|
||||||
|
@ -44,6 +44,12 @@ if (getEnvironment() === Environment.Production) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const config: IConfig = require('config');
|
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
|
// Log resulting env vars in use by config
|
||||||
[
|
[
|
||||||
'NODE_ENV',
|
'NODE_ENV',
|
||||||
|
|
Loading…
Add table
Reference in a new issue