mirror of
https://github.com/github/codeql-action
synced 2026-05-25 15:00:36 +03:00
Always include exit code in first line of CommandInvocationError
This commit is contained in:
Generated
+2
-5
@@ -41,11 +41,8 @@ class CommandInvocationError extends Error {
|
||||
const prettyCommand = [cmd, ...args]
|
||||
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||
.join(" ");
|
||||
error = error.trim();
|
||||
const separator = error.includes("\n") ? "\n" : " ";
|
||||
super(`Encountered a fatal error while running "${prettyCommand}".${separator}` +
|
||||
`Exit code was ${exitCode} and error was:${separator}` +
|
||||
`${error}`);
|
||||
super(`Encountered a fatal error while running "${prettyCommand}". ` +
|
||||
`Exit code was ${exitCode} and error was: ${error.trim()}`);
|
||||
this.exitCode = exitCode;
|
||||
this.error = error;
|
||||
this.output = output;
|
||||
|
||||
Reference in New Issue
Block a user