File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ interface VersionResult {
1010}
1111
1212export interface CliFeatures {
13- featuresInVersionResult ?: boolean ;
1413 queryServerRunQueries ?: boolean ;
1514}
1615
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ export class CodeQLCliServer implements Disposable {
269269 /** Path to current codeQL executable, or undefined if not running yet. */
270270 codeQlPath : string | undefined ;
271271
272- cliConstraints = new CliVersionConstraint ( ) ;
272+ cliConstraints = new CliVersionConstraint ( this ) ;
273273
274274 /**
275275 * When set to true, ignore some modal popups and assume user has clicked "yes".
@@ -1902,4 +1902,12 @@ export class CliVersionConstraint {
19021902 // The oldest version of the CLI that we support. This is used to determine
19031903 // whether to show a warning about the CLI being too old on startup.
19041904 public static OLDEST_SUPPORTED_CLI_VERSION = new SemVer ( "2.18.4" ) ;
1905+
1906+ constructor ( private readonly cli : CodeQLCliServer ) {
1907+ /**/
1908+ }
1909+
1910+ async supportsQueryServerRunQueries ( ) : Promise < boolean > {
1911+ return ( await this . cli . getFeatures ( ) ) . queryServerRunQueries === true ;
1912+ }
19051913}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export class QueryServerClient extends DisposableObject {
100100 * queries at once.
101101 */
102102 async supportsRunQueriesMethod ( ) : Promise < boolean > {
103- return ( await this . cliServer . getFeatures ( ) ) . queryServerRunQueries === true ;
103+ return await this . cliServer . cliConstraints . supportsQueryServerRunQueries ( ) ;
104104 }
105105
106106 /** Stops the query server by disposing of the current server process. */
You can’t perform that action at this time.
0 commit comments