Fix file extension of generated query suite

See https://github.com/github/codeql-coreql-team/issues/452
This commit is contained in:
Andrew Eisenberg 2020-06-26 11:10:39 -07:00
Родитель 7379f4996a
Коммит 4beead54be
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -42,7 +42,9 @@ function nameOfKeyType(keyType: KeyType): string {
} }
async function resolveQueries(cli: CodeQLCliServer, qlpack: string, keyType: KeyType): Promise<string[]> { async function resolveQueries(cli: CodeQLCliServer, qlpack: string, keyType: KeyType): Promise<string[]> {
const suiteFile = (await tmp.file()).path; const suiteFile = (await tmp.file({
postfix: '.qls'
})).path;
const suiteYaml = { qlpack, include: { kind: 'definitions', 'tags contain': tagOfKeyType(keyType) } }; const suiteYaml = { qlpack, include: { kind: 'definitions', 'tags contain': tagOfKeyType(keyType) } };
await fs.writeFile(suiteFile, yaml.safeDump(suiteYaml), 'utf8'); await fs.writeFile(suiteFile, yaml.safeDump(suiteYaml), 'utf8');