Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lib/site-server-process.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { app, utilityProcess, UtilityProcess } from 'electron';
import { PHPRunOptions } from '@php-wasm/universal';
import * as Sentry from '@sentry/electron/renderer';
import { WPNowOptions } from '../../vendor/wp-now/src/config';

// This allows TypeScript to pick up the magic constants that's auto-generated by Forge's Webpack
Expand Down Expand Up @@ -135,7 +136,7 @@ export default class SiteServerProcess {
throw Error( 'Server process is not running' );
}

return new Promise( ( resolve, reject ) => {
return new Promise< void >( ( resolve, reject ) => {
process.once( 'exit', ( code ) => {
if ( code !== 0 ) {
reject( new Error( `Site server process exited with code ${ code } upon stopping` ) );
Expand All @@ -144,6 +145,8 @@ export default class SiteServerProcess {
resolve();
} );
process.kill();
} ).catch( ( error ) => {
Sentry.captureException( error );
} );
}
}