Merge pull request #2501 from github/henrymercer/missing-autobuild-config-error

Fix inconsistency in autobuild error tracking
This commit is contained in:
Henry Mercer 2024-09-23 22:50:02 +01:00 committed by GitHub
commit 07e8133971
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 10 deletions

5
lib/codeql.js generated
View file

@ -359,10 +359,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
const prefix = "We were unable to automatically build your code. " +
"Please change the build mode for this language to manual and specify build steps " +
`for your project. See ${doc_url_1.DocUrl.AUTOMATIC_BUILD_FAILED} for more information.`;
const ErrorConstructor = e instanceof util.ConfigurationError
? util.ConfigurationError
: Error;
throw new ErrorConstructor(`${prefix} ${(0, util_1.getErrorMessage)(e)}`);
throw new util.ConfigurationError(`${prefix} ${(0, util_1.getErrorMessage)(e)}`);
}
else {
throw e;

File diff suppressed because one or more lines are too long

View file

@ -703,11 +703,7 @@ export async function getCodeQLForCmd(
"We were unable to automatically build your code. " +
"Please change the build mode for this language to manual and specify build steps " +
`for your project. See ${DocUrl.AUTOMATIC_BUILD_FAILED} for more information.`;
const ErrorConstructor =
e instanceof util.ConfigurationError
? util.ConfigurationError
: Error;
throw new ErrorConstructor(`${prefix} ${getErrorMessage(e)}`);
throw new util.ConfigurationError(`${prefix} ${getErrorMessage(e)}`);
} else {
throw e;
}