Bring error message method name inline with others
This commit is contained in:
parent
a66f2b0b11
commit
51becd2cf8
6 changed files with 9 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ test("load non-local input with invalid repo syntax", async t => {
|
|||
await configUtils.loadConfig();
|
||||
throw new Error('loadConfig did not throw error');
|
||||
} catch (err) {
|
||||
t.deepEqual(err, new Error(configUtils.getConfigFileRepoFormatInvalid('octo-org/codeql-config@main')));
|
||||
t.deepEqual(err, new Error(configUtils.getConfigFileRepoFormatInvalidMessage('octo-org/codeql-config@main')));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export function getConfigFileDoesNotExistErrorMessage(configFile: string): strin
|
|||
return 'The configuration file "' + configFile + '" does not exist';
|
||||
}
|
||||
|
||||
export function getConfigFileRepoFormatInvalid(configFile: string): string {
|
||||
export function getConfigFileRepoFormatInvalidMessage(configFile: string): string {
|
||||
let error = 'The configuration file "' + configFile + '" is not a supported remote file reference.';
|
||||
error += ' Expected format <owner>/<repository>/<file-path>@<ref>';
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ async function getRemoteConfig(configFile: string): Promise<any> {
|
|||
const pieces = format.exec(configFile);
|
||||
// 5 = 4 groups + the whole expression
|
||||
if (pieces === null || pieces.groups === undefined || pieces.length < 5) {
|
||||
throw new Error(getConfigFileRepoFormatInvalid(configFile));
|
||||
throw new Error(getConfigFileRepoFormatInvalidMessage(configFile));
|
||||
}
|
||||
|
||||
const response = await api.client.repos.getContents({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue