Move version check next to existing check
This commit is contained in:
@@ -54,16 +54,6 @@ export class DataExtensionsEditorModule {
|
|||||||
public getCommands(): DataExtensionsEditorCommands {
|
public getCommands(): DataExtensionsEditorCommands {
|
||||||
return {
|
return {
|
||||||
"codeQL.openDataExtensionsEditor": async () => {
|
"codeQL.openDataExtensionsEditor": async () => {
|
||||||
if (
|
|
||||||
!(await this.cliServer.cliConstraints.supportsResolveExtensions())
|
|
||||||
) {
|
|
||||||
void showAndLogErrorMessage(
|
|
||||||
this.app.logger,
|
|
||||||
"CodeQL CLI version v2.10.2 or later is required to use the data extensions editor.",
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const db = this.databaseManager.currentDatabaseItem;
|
const db = this.databaseManager.currentDatabaseItem;
|
||||||
if (!db) {
|
if (!db) {
|
||||||
void showAndLogErrorMessage(this.app.logger, "No database selected");
|
void showAndLogErrorMessage(this.app.logger, "No database selected");
|
||||||
@@ -88,6 +78,16 @@ export class DataExtensionsEditorModule {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!(await this.cliServer.cliConstraints.supportsResolveExtensions())
|
||||||
|
) {
|
||||||
|
void showAndLogErrorMessage(
|
||||||
|
this.app.logger,
|
||||||
|
`This feature requires CodeQL CLI version ${CliVersionConstraint.CLI_VERSION_WITH_RESOLVE_EXTENSIONS.format()} or later.`,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const modelFile = await pickExtensionPack(
|
const modelFile = await pickExtensionPack(
|
||||||
this.cliServer,
|
this.cliServer,
|
||||||
db,
|
db,
|
||||||
|
|||||||
Reference in New Issue
Block a user