From 8e2f12274d4749e689a0d3c8e8e71354bdc11f57 Mon Sep 17 00:00:00 2001 From: Jaisurya Nanduri <91620234+jaisnan@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:13:32 -0400 Subject: [PATCH] Fix output parsing when using debugger (#124) --- src/debugger/debugger.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debugger/debugger.ts b/src/debugger/debugger.ts index cf784ad..c441e3f 100644 --- a/src/debugger/debugger.ts +++ b/src/debugger/debugger.ts @@ -44,8 +44,12 @@ async function getBinaryPath(): Promise { const output = execFileSync(kaniBinaryPath, commandSplit.args, options); const outputString = output.toString(); - const lines = outputString.trim().split('\n'); + // Remove version string before JSON parsing + // NOTE: This is a temporary patch till is fixed. + lines.shift(); + + // Parse JSON objects from response const jsonMessages = lines.map((line: string) => JSON.parse(line)); /*