Skip to content

Commit 61b5859

Browse files
committed
Keep the JSON exception message consistent
1 parent 7d1c6e9 commit 61b5859

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

lib/entry-points.js

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/codeql.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,9 +1139,8 @@ async function runCliJson<T>(
11391139
const output = await runCli(cmd, args, opts);
11401140
try {
11411141
return JSON.parse(output) as T;
1142-
} catch {
1143-
const command = [cmd, ...args].join(" ");
1144-
throw Error(`Invalid JSON output from \`${command}\`: ${output}`);
1142+
} catch (e) {
1143+
throw Error(`Unexpected output from codeql ${args.join(" ")}: ${e}`);
11451144
}
11461145
}
11471146

0 commit comments

Comments
 (0)