mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 17:39:50 +00:00
Refactoring: Simplify retrieving error message
This commit is contained in:
4
lib/codeql.js
generated
4
lib/codeql.js
generated
@@ -142,7 +142,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV
|
||||
};
|
||||
}
|
||||
catch (e) {
|
||||
throw new Error(`Unable to download and extract CodeQL CLI: ${(0, util_1.wrapError)(e).message}`);
|
||||
throw new Error(`Unable to download and extract CodeQL CLI: ${(0, util_1.getErrorMessage)(e)}`);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -362,7 +362,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
const ErrorConstructor = e instanceof util.ConfigurationError
|
||||
? util.ConfigurationError
|
||||
: Error;
|
||||
throw new ErrorConstructor(`${prefix} ${util.wrapError(e).message}`);
|
||||
throw new ErrorConstructor(`${prefix} ${(0, util_1.getErrorMessage)(e)}`);
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user