Skip to content

Commit

Permalink
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/codeql.js.map
5 changes: 4 additions & 1 deletion src/codeql.ts
@@ -543,12 +543,15 @@ export function getCachedCodeQL(): CodeQL {
}

function getCodeQLForCmd(cmd: string): CodeQL {
let cachedVersion: undefined | Promise<string> = undefined;
return {
getPath() {
return cmd;
},
async getVersion() {
return await runTool(cmd, ["version", "--format=terse"]);
if (cachedVersion === undefined)
cachedVersion = runTool(cmd, ["version", "--format=terse"]);
return await cachedVersion;
},
async printVersion() {
await runTool(cmd, ["version", "--format=json"]);

0 comments on commit 4ba53e3

Please sign in to comment.