Integration tests: Accept github/codeql checkouts named ql (#1940)

Some checkouts of the github/codeql repo, such as the
internal submodule, may be named `ql` rather than
`codeql`. Allow this folder name when running tests.
This commit is contained in:
Aditya Sharad
2023-01-06 15:16:36 -08:00
committed by GitHub
parent 2a6d581de4
commit 8346eda8b8

View File

@@ -64,7 +64,9 @@ beforeAll(async () => {
'No workspace folders found.\nYou will need a local copy of the codeql repo.\nMake sure you specify the path to it in launch.json.\nIt should be something along the lines of "${workspaceRoot}/../codeql" depending on where you have your local copy of the codeql repo.',
);
} else {
const codeqlFolder = folders.find((folder) => folder.name === "codeql");
const codeqlFolder = folders.find((folder) =>
["codeql", "ql"].includes(folder.name),
);
if (!codeqlFolder) {
throw new Error(
'No workspace folders found.\nYou will need a local copy of the codeql repo.\nMake sure you specify the path to it in launch.json.\nIt should be something along the lines of "${workspaceRoot}/../codeql" depending on where you have your local copy of the codeql repo.\n\n\n',