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 {
10
10
}
11
11
12
12
export interface CliFeatures {
13
- featuresInVersionResult ?: boolean ;
14
13
queryServerRunQueries ?: boolean ;
15
14
}
16
15
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ export class CodeQLCliServer implements Disposable {
269
269
/** Path to current codeQL executable, or undefined if not running yet. */
270
270
codeQlPath : string | undefined ;
271
271
272
- cliConstraints = new CliVersionConstraint ( ) ;
272
+ cliConstraints = new CliVersionConstraint ( this ) ;
273
273
274
274
/**
275
275
* When set to true, ignore some modal popups and assume user has clicked "yes".
@@ -1902,4 +1902,12 @@ export class CliVersionConstraint {
1902
1902
// The oldest version of the CLI that we support. This is used to determine
1903
1903
// whether to show a warning about the CLI being too old on startup.
1904
1904
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
+ }
1905
1913
}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export class QueryServerClient extends DisposableObject {
100
100
* queries at once.
101
101
*/
102
102
async supportsRunQueriesMethod ( ) : Promise < boolean > {
103
- return ( await this . cliServer . getFeatures ( ) ) . queryServerRunQueries === true ;
103
+ return await this . cliServer . cliConstraints . supportsQueryServerRunQueries ( ) ;
104
104
}
105
105
106
106
/** Stops the query server by disposing of the current server process. */
You can’t perform that action at this time.
0 commit comments