From ddaa9834c353acece87b1719a827f3047dc03160 Mon Sep 17 00:00:00 2001 From: Andrew Eisenberg Date: Fri, 9 Apr 2021 15:12:41 -0700 Subject: [PATCH] Add cli version for message --- extensions/ql-vscode/src/cli.ts | 6 +++--- extensions/ql-vscode/src/extension.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/extensions/ql-vscode/src/cli.ts b/extensions/ql-vscode/src/cli.ts index fbe5702ea4d..fcb69e03bad 100644 --- a/extensions/ql-vscode/src/cli.ts +++ b/extensions/ql-vscode/src/cli.ts @@ -151,7 +151,7 @@ export class CodeQLCliServer implements Disposable { /** * CLI version where the `codeql resolve qlref` command is available. */ - private static CLI_VERSION_WITH_RESOLVE_QLREF = new SemVer('2.5.1'); + public static CLI_VERSION_WITH_RESOLVE_QLREF = new SemVer('2.5.1'); /** The process for the cli server, or undefined if one doesn't exist yet */ process?: child_process.ChildProcessWithoutNullStreams; @@ -937,11 +937,11 @@ class SplitBuffer { /** * A version of startsWith that isn't overriden by a broken version of ms-python. - * + * * The definition comes from * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith * which is CC0/public domain - * + * * See https://github.com/github/vscode-codeql/issues/802 for more context as to why we need it. */ private static startsWith(s: string, searchString: string, position: number): boolean { diff --git a/extensions/ql-vscode/src/extension.ts b/extensions/ql-vscode/src/extension.ts index c4a4511ba4c..65d186e7e83 100644 --- a/extensions/ql-vscode/src/extension.ts +++ b/extensions/ql-vscode/src/extension.ts @@ -492,7 +492,9 @@ async function activateWithInstalledDistribution( helpers.showAndLogErrorMessage( 'Jumping from a .qlref file to the .ql file it references is not ' + 'supported with the CLI version you are running.\n' - + 'Please upgrade your CLI to use this feature.'); + + `Please upgrade your CLI to version ${ + CodeQLCliServer.CLI_VERSION_WITH_RESOLVE_QLREF + } or later to use this feature.`); } } }