From 0482c15852185b552585465b11d320be87882ee5 Mon Sep 17 00:00:00 2001 From: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:35:52 -0700 Subject: [PATCH] Log config sources and allow other file extensions --- .gitignore | 2 +- app/config.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 63dad4b65a..7954a10aea 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ stylesheets/*.css.map /dist .DS_Store config/local.json -config/local-*.json +config/local-* *.provisionprofile release/ /dev-app-update.yml diff --git a/app/config.ts b/app/config.ts index 779e5f29fe..89b49296a2 100644 --- a/app/config.ts +++ b/app/config.ts @@ -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',