From 7bf3252cdb799a6dff9a1a8b43b3e733c3c2a394 Mon Sep 17 00:00:00 2001 From: FilipBl4gojevic <84703395+FilipBl4gojevic@users.noreply.github.com> Date: Mon, 10 Aug 2026 18:44:41 +0200 Subject: [PATCH] fix(gateway): match both path separators in the direct-invocation guard process.argv[1] arrives with backslashes on Windows, so the forward-slash-only pattern never matched and `start` exited 0 without starting the server, and without printing anything. Found while running the gateway locally to verify this branch's OCR route end to end; bundled here because it blocks that verification on Windows. Co-Authored-By: Claude Opus 4.8 --- gateway/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gateway/src/index.ts b/gateway/src/index.ts index 50367f6..8c634a6 100644 --- a/gateway/src/index.ts +++ b/gateway/src/index.ts @@ -57,7 +57,10 @@ export function runMain(env: Record): void { const invokedDirectly = typeof process !== "undefined" && process.argv?.[1] !== undefined && - /gateway\/(src|dist)\/index\.(t|j)s$/.test(process.argv[1]); + // Accept both path separators: on Windows process.argv[1] arrives with + // backslashes, so a forward-slash-only pattern silently never matches and + // the process exits 0 without ever starting the server. + /gateway[\\/](src|dist)[\\/]index\.(t|j)s$/.test(process.argv[1]); if (invokedDirectly) { try {