mirror of
https://github.com/github/codeql-action.git
synced 2026-01-05 06:00:32 +08:00
Improve CommandInvocationError message
This commit is contained in:
@@ -51,9 +51,12 @@ export class CommandInvocationError extends Error {
|
||||
public error: string,
|
||||
public output: string
|
||||
) {
|
||||
const prettyCommand = [cmd, ...args]
|
||||
.map((x) => (x.includes(" ") ? `'${x}'` : x))
|
||||
.join(" ");
|
||||
super(
|
||||
`Failure invoking ${cmd} with arguments ${args}.\n` +
|
||||
`Exit code ${exitCode} and error was:\n` +
|
||||
`Encountered a fatal error while running "${prettyCommand}".\n` +
|
||||
`Exit code was ${exitCode} and error was:\n` +
|
||||
`${error}`
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user