@@ -183,15 +183,15 @@ export class CodeQLCliServer implements Disposable {
183183 killProcessIfRunning ( ) : void {
184184 if ( this . process ) {
185185 // Tell the Java CLI server process to shut down.
186- this . logger . log ( 'Sending shutdown request' ) ;
186+ void this . logger . log ( 'Sending shutdown request' ) ;
187187 try {
188188 this . process . stdin . write ( JSON . stringify ( [ 'shutdown' ] ) , 'utf8' ) ;
189189 this . process . stdin . write ( this . nullBuffer ) ;
190- this . logger . log ( 'Sent shutdown request' ) ;
190+ void this . logger . log ( 'Sent shutdown request' ) ;
191191 } catch ( e ) {
192192 // We are probably fine here, the process has already closed stdin.
193- this . logger . log ( `Shutdown request failed: process stdin may have already closed. The error was ${ e } ` ) ;
194- this . logger . log ( 'Stopping the process anyway.' ) ;
193+ void this . logger . log ( `Shutdown request failed: process stdin may have already closed. The error was ${ e } ` ) ;
194+ void this . logger . log ( 'Stopping the process anyway.' ) ;
195195 }
196196 // Close the stdin and stdout streams.
197197 // This is important on Windows where the child process may not die cleanly.
@@ -271,7 +271,7 @@ export class CodeQLCliServer implements Disposable {
271271 // Compute the full args array
272272 const args = command . concat ( LOGGING_FLAGS ) . concat ( commandArgs ) ;
273273 const argsString = args . join ( ' ' ) ;
274- this . logger . log ( `${ description } using CodeQL CLI: ${ argsString } ...` ) ;
274+ void this . logger . log ( `${ description } using CodeQL CLI: ${ argsString } ...` ) ;
275275 try {
276276 await new Promise < void > ( ( resolve , reject ) => {
277277 // Start listening to stdout
@@ -298,7 +298,7 @@ export class CodeQLCliServer implements Disposable {
298298 const fullBuffer = Buffer . concat ( stdoutBuffers ) ;
299299 // Make sure we remove the terminator;
300300 const data = fullBuffer . toString ( 'utf8' , 0 , fullBuffer . length - 1 ) ;
301- this . logger . log ( 'CLI command succeeded.' ) ;
301+ void this . logger . log ( 'CLI command succeeded.' ) ;
302302 return data ;
303303 } catch ( err ) {
304304 // Kill the process if it isn't already dead.
@@ -311,7 +311,7 @@ export class CodeQLCliServer implements Disposable {
311311 newError . stack += ( err . stack || '' ) ;
312312 throw newError ;
313313 } finally {
314- this . logger . log ( Buffer . concat ( stderrBuffers ) . toString ( 'utf8' ) ) ;
314+ void this . logger . log ( Buffer . concat ( stderrBuffers ) . toString ( 'utf8' ) ) ;
315315 // Remove the listeners we set up.
316316 process . stdout . removeAllListeners ( 'data' ) ;
317317 process . stderr . removeAllListeners ( 'data' ) ;
@@ -371,7 +371,7 @@ export class CodeQLCliServer implements Disposable {
371371 }
372372 if ( logger !== undefined ) {
373373 // The human-readable output goes to stderr.
374- logStream ( child . stderr ! , logger ) ;
374+ void logStream ( child . stderr ! , logger ) ;
375375 }
376376
377377 for await ( const event of await splitStreamAtSeparators ( child . stdout ! , [ '\0' ] ) ) {
@@ -813,7 +813,7 @@ export function spawnServer(
813813 if ( progressReporter !== undefined ) {
814814 progressReporter . report ( { message : `Starting ${ name } ` } ) ;
815815 }
816- logger . log ( `Starting ${ name } using CodeQL CLI: ${ base } ${ argsString } ` ) ;
816+ void logger . log ( `Starting ${ name } using CodeQL CLI: ${ base } ${ argsString } ` ) ;
817817 const child = child_process . spawn ( base , args ) ;
818818 if ( ! child || ! child . pid ) {
819819 throw new Error ( `Failed to start ${ name } using command ${ base } ${ argsString } .` ) ;
@@ -829,7 +829,7 @@ export function spawnServer(
829829 if ( progressReporter !== undefined ) {
830830 progressReporter . report ( { message : `Started ${ name } ` } ) ;
831831 }
832- logger . log ( `${ name } started on PID: ${ child . pid } ` ) ;
832+ void logger . log ( `${ name } started on PID: ${ child . pid } ` ) ;
833833 return child ;
834834}
835835
@@ -858,10 +858,10 @@ export async function runCodeQlCliCommand(
858858 if ( progressReporter !== undefined ) {
859859 progressReporter . report ( { message : description } ) ;
860860 }
861- logger . log ( `${ description } using CodeQL CLI: ${ codeQlPath } ${ argsString } ...` ) ;
861+ void logger . log ( `${ description } using CodeQL CLI: ${ codeQlPath } ${ argsString } ...` ) ;
862862 const result = await promisify ( child_process . execFile ) ( codeQlPath , args ) ;
863- logger . log ( result . stderr ) ;
864- logger . log ( 'CLI command succeeded.' ) ;
863+ void logger . log ( result . stderr ) ;
864+ void logger . log ( 'CLI command succeeded.' ) ;
865865 return result . stdout ;
866866 } catch ( err ) {
867867 throw new Error ( `${ description } failed: ${ err . stderr || err } ` ) ;
@@ -976,7 +976,7 @@ const lineEndings = ['\r\n', '\r', '\n'];
976976 */
977977async function logStream ( stream : Readable , logger : Logger ) : Promise < void > {
978978 for await ( const line of await splitStreamAtSeparators ( stream , lineEndings ) ) {
979- logger . log ( line ) ;
979+ await logger . log ( line ) ;
980980 }
981981}
982982
0 commit comments