@@ -635,9 +635,10 @@ export class CodeQLCliServer implements Disposable {
635635 } = { } ,
636636 ) : Promise < OutputType > {
637637 let args : string [ ] = [ ] ;
638- if ( addFormat )
638+ if ( addFormat ) {
639639 // Add format argument first, in case commandArgs contains positional parameters.
640640 args = args . concat ( [ "--format" , "json" ] ) ;
641+ }
641642 args = args . concat ( commandArgs ) ;
642643 const result = await this . runCodeQlCliCommand ( command , args , description , {
643644 progressReporter,
@@ -939,8 +940,12 @@ export class CodeQLCliServer implements Disposable {
939940 name ?: string ,
940941 ) : Promise < string > {
941942 const subcommandArgs = [ ] ;
942- if ( target ) subcommandArgs . push ( "--target" , target ) ;
943- if ( name ) subcommandArgs . push ( "--name" , name ) ;
943+ if ( target ) {
944+ subcommandArgs . push ( "--target" , target ) ;
945+ }
946+ if ( name ) {
947+ subcommandArgs . push ( "--name" , name ) ;
948+ }
944949 subcommandArgs . push ( archivePath ) ;
945950
946951 return await this . runCodeQlCliCommand (
@@ -961,7 +966,9 @@ export class CodeQLCliServer implements Disposable {
961966 outputDirectory ?: string ,
962967 ) : Promise < string > {
963968 const subcommandArgs = [ "--format=markdown" ] ;
964- if ( outputDirectory ) subcommandArgs . push ( "--output" , outputDirectory ) ;
969+ if ( outputDirectory ) {
970+ subcommandArgs . push ( "--output" , outputDirectory ) ;
971+ }
965972 subcommandArgs . push ( pathToQhelp ) ;
966973
967974 return await this . runCodeQlCliCommand (
@@ -1609,16 +1616,19 @@ export function spawnServer(
16091616 } ) ;
16101617 // Set up event listeners.
16111618 child . on ( "close" , async ( code , signal ) => {
1612- if ( code !== null )
1619+ if ( code !== null ) {
16131620 void logger . log ( `Child process exited with code ${ code } ` ) ;
1614- if ( signal )
1621+ }
1622+ if ( signal ) {
16151623 void logger . log (
16161624 `Child process exited due to receipt of signal ${ signal } ` ,
16171625 ) ;
1626+ }
16181627 // If the process exited abnormally, log the last stdout message,
16191628 // It may be from the jvm.
1620- if ( code !== 0 && lastStdout !== undefined )
1629+ if ( code !== 0 && lastStdout !== undefined ) {
16211630 void logger . log ( `Last stdout was "${ lastStdout . toString ( ) } "` ) ;
1631+ }
16221632 } ) ;
16231633 child . stderr ! . on ( "data" , stderrListener ) ;
16241634 if ( stdoutListener !== undefined ) {
0 commit comments