mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Improve CommandInvocationError message
This commit is contained in:
7
lib/codeql.js
generated
7
lib/codeql.js
generated
@@ -38,8 +38,11 @@ const util = __importStar(require("./util"));
|
||||
const util_1 = require("./util");
|
||||
class CommandInvocationError extends Error {
|
||||
constructor(cmd, args, exitCode, error, output) {
|
||||
super(`Failure invoking ${cmd} with arguments ${args}.\n` +
|
||||
`Exit code ${exitCode} and error was:\n` +
|
||||
const prettyCommand = [cmd, ...args]
|
||||
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||
.join(" ");
|
||||
super(`Encountered a fatal error while running "${prettyCommand}".\n` +
|
||||
`Exit code was ${exitCode} and error was:\n` +
|
||||
`${error}`);
|
||||
this.exitCode = exitCode;
|
||||
this.error = error;
|
||||
|
||||
Reference in New Issue
Block a user