File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -792,11 +792,19 @@ async function activateWithInstalledDistribution(
792792
793793 ctx . subscriptions . push (
794794 commandRunner ( 'codeQL.copyVersion' , async ( ) => {
795- const text = `CodeQL extension version: ${ extension ?. packageJSON . version } \nCodeQL CLI version: ${ await cliServer . getVersion ( ) } \nPlatform: ${ os . platform ( ) } ${ os . arch ( ) } ` ;
795+ const text = `CodeQL extension version: ${ extension ?. packageJSON . version } \nCodeQL CLI version: ${ await getCliVersion ( ) } \nPlatform: ${ os . platform ( ) } ${ os . arch ( ) } ` ;
796796 await env . clipboard . writeText ( text ) ;
797797 void helpers . showAndLogInformationMessage ( text ) ;
798798 } ) ) ;
799799
800+ const getCliVersion = async ( ) => {
801+ try {
802+ return await cliServer . getVersion ( ) ;
803+ } catch {
804+ return '<missing>' ;
805+ }
806+ } ;
807+
800808 // The "authenticateToGitHub" command is internal-only.
801809 ctx . subscriptions . push (
802810 commandRunner ( 'codeQL.authenticateToGitHub' , async ( ) => {
You can’t perform that action at this time.
0 commit comments