Skip to content

Commit 1dcd048

Browse files
Move version check next to existing check
1 parent 1251192 commit 1dcd048

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

extensions/ql-vscode/src/data-extensions-editor/data-extensions-editor-module.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,6 @@ export class DataExtensionsEditorModule {
5454
public getCommands(): DataExtensionsEditorCommands {
5555
return {
5656
"codeQL.openDataExtensionsEditor": async () => {
57-
if (
58-
!(await this.cliServer.cliConstraints.supportsResolveExtensions())
59-
) {
60-
void showAndLogErrorMessage(
61-
this.app.logger,
62-
"CodeQL CLI version v2.10.2 or later is required to use the data extensions editor.",
63-
);
64-
return;
65-
}
66-
6757
const db = this.databaseManager.currentDatabaseItem;
6858
if (!db) {
6959
void showAndLogErrorMessage(this.app.logger, "No database selected");
@@ -88,6 +78,16 @@ export class DataExtensionsEditorModule {
8878
return;
8979
}
9080

81+
if (
82+
!(await this.cliServer.cliConstraints.supportsResolveExtensions())
83+
) {
84+
void showAndLogErrorMessage(
85+
this.app.logger,
86+
`This feature requires CodeQL CLI version ${CliVersionConstraint.CLI_VERSION_WITH_RESOLVE_EXTENSIONS.format()} or later.`,
87+
);
88+
return;
89+
}
90+
9191
const modelFile = await pickExtensionPack(
9292
this.cliServer,
9393
db,

0 commit comments

Comments
 (0)