Skip to content

Commit

Permalink
Fix output parsing when using debugger (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaisnan authored Jul 31, 2023
1 parent 9129cca commit 8e2f122
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/debugger/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ async function getBinaryPath(): Promise<string | undefined> {

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 <https://github.com/model-checking/kani/issues/2649> is fixed.
lines.shift();

// Parse JSON objects from response
const jsonMessages = lines.map((line: string) => JSON.parse(line));

/*
Expand Down

0 comments on commit 8e2f122

Please sign in to comment.