From 41938f632bbece7c9d886610446961f0ecab4376 Mon Sep 17 00:00:00 2001 From: gentlementlegen Date: Wed, 15 May 2024 16:03:46 +0900 Subject: [PATCH] chore: merge configuration before checking validity --- src/configuration/config-reader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configuration/config-reader.ts b/src/configuration/config-reader.ts index c09f0fbd..0fb31c30 100644 --- a/src/configuration/config-reader.ts +++ b/src/configuration/config-reader.ts @@ -13,9 +13,9 @@ try { } if (program.settings) { - const settings = JSON.parse(program.settings); + const settings = merge(configuration, JSON.parse(program.settings)); if (validateIncentivesConfiguration.test(settings)) { - configuration = merge(configuration, settings); + configuration = settings; } else { console.warn("Invalid incentives configuration detected, will revert to defaults."); for (const error of validateIncentivesConfiguration.errors(settings)) {