Display the error message on one line if possible

This commit is contained in:
Henry Mercer 2023-07-21 11:40:07 +01:00
parent 0f871fa80d
commit 65a297b952
6 changed files with 14 additions and 10 deletions

4
lib/codeql.test.js generated
View file

@ -738,8 +738,8 @@ for (const { featureEnabled, codeqlVersion, flagPassed, negativeFlagPassed, } of
// safeWhich throws because of the test CodeQL object.
sinon.stub(safeWhich, "safeWhich").resolves("");
await t.throwsAsync(async () => await codeqlObject.finalizeDatabase("db", "--threads=2", "--ram=2048"), {
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db".\n' +
`Exit code was 32 and error was:\n${cliMessage}`,
message: 'Encountered a fatal error while running "codeql-for-testing database finalize --finalize-dataset --threads=2 --ram=2048 db". ' +
`Exit code was 32 and error was: ${cliMessage}`,
});
});
function stubToolRunnerConstructor(exitCode = 0, stderr) {