From c96b764e304602bb2ceac55454fa460c066acdc5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 17 Jul 2023 16:22:25 +0200 Subject: [PATCH] refactor: move code into try catch block MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Configuration.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/Configuration.ts b/src/utils/Configuration.ts index 473906df..4aaa2250 100644 --- a/src/utils/Configuration.ts +++ b/src/utils/Configuration.ts @@ -474,6 +474,9 @@ export class Configuration { Configuration.configurationData = JSON.parse( readFileSync(Configuration.configurationFile, 'utf8'), ) as ConfigurationData; + if (!Configuration.configurationFileWatcher) { + Configuration.configurationFileWatcher = Configuration.getConfigurationFileWatcher(); + } } catch (error) { Configuration.handleFileException( Configuration.configurationFile, @@ -482,9 +485,6 @@ export class Configuration { Configuration.logPrefix(), ); } - if (!Configuration.configurationFileWatcher) { - Configuration.configurationFileWatcher = Configuration.getConfigurationFileWatcher(); - } } return Configuration.configurationData; } -- 2.34.1