Add HYTALE_NOOP_TEST to test read/write without patching

Tests if our file read/write process itself causes corruption.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
sanasol
2026-01-27 04:05:08 +01:00
parent 6333263ef9
commit ab6f932245

View File

@@ -577,6 +577,14 @@ class ClientPatcher {
progressCallback('Patching domain references...', 50);
}
// HYTALE_NOOP_TEST: Just read and write binary without any changes
if (process.env.HYTALE_NOOP_TEST === '1') {
console.log('NOOP TEST: Writing binary without modifications...');
fs.writeFileSync(clientPath, data);
this.markAsPatched(clientPath);
return { success: true, patchCount: 0, noop: true };
}
console.log('Applying domain patches (length-prefixed format)...');
const { buffer: patchedData, count } = this.applyDomainPatches(data, newDomain);