Skip to content

Copying version information does not work without CodeQL CLI #902

@Marcono1234

Description

@Marcono1234

Describe the bug
When you click the extension information at the top right corner, version information should be copied, see #845.
However, this does not work if no CodeQL CLI is configured (or when the extension fails finding it for some reason).

Since the copied data also contains information about the extension version and platform, it should work without a CodeQL CLI, especially in case an extension bug prevents CodeQL CLI detection from working; otherwise users could not easily report such a bug.

Version
Extension:

CodeQL extension version: 1.5.1 
CodeQL CLI version: 2.5.7 
Platform: win32 x64

VSCode:

Version: 1.57.1 (user setup)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:07.755Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19041

To reproduce

  1. Open the CodeQL extension settings (@ext:github.vscode-codeql)
  2. Change "CodeQL > CLI: Executable Path" to an invalid path
  3. Click the text "CodeQL" at the bottom right corner
    ❌ It fails with the message "No distribution found (codeQL.copyVersion)" and no information is copied

Expected behavior
Copying version information should be possible without a CodeQL CLI; the copied data should indicate that CodeQL CLI is missing, e.g.:

CodeQL extension version: 1.5.1 
CodeQL CLI version: <missing>
Platform: win32 x64

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions