From 37c22820522ef7b8c5e3515196d263c8e841de02 Mon Sep 17 00:00:00 2001 From: HerozDotExe Date: Sun, 7 Dec 2025 17:20:50 +0100 Subject: [PATCH] feat: throw an error if log4j file got changed --- src/core/log4j.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/log4j.ts b/src/core/log4j.ts index 27dbf05..74182b1 100644 --- a/src/core/log4j.ts +++ b/src/core/log4j.ts @@ -18,13 +18,13 @@ export async function getArgument( url: versionManifest.logging.client.file.url, path: xmlDestination, }); + } - if ( - hash("sha1", await fs.readFile(xmlDestination, {encoding: "utf-8"})) !== - versionManifest.logging.client.file.sha1 - ) { - throw new Error("Wrong hash for log4j's xml config"); - } + if ( + hash("sha1", await fs.readFile(xmlDestination, { encoding: "utf-8" })) !== + versionManifest.logging.client.file.sha1 + ) { + throw new Error("Wrong hash for log4j's xml config"); } return versionManifest.logging.client.argument.replace(