From e9175de00fb79ef373adbe795be40745d44309cc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 27 May 2024 08:21:13 +0700 Subject: [PATCH] fix(developer): test existence of ngrok.exe before atttempting to start Fixes the scenario where the `%AppData%\Keyman\Keyman Developer\Server\bin` folder exists, but ngrok.exe is not in the folder, which caused Keyman Developer Server to crash. Fixes: #11542 Fixes: KEYMAN-DEVELOPER-1JE --- developer/src/server/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/developer/src/server/src/index.ts b/developer/src/server/src/index.ts index ebf2168024..eed84f3b1a 100644 --- a/developer/src/server/src/index.ts +++ b/developer/src/server/src/index.ts @@ -91,7 +91,10 @@ export async function run() { configuration.ngrokEndpoint = ''; - if(configuration.useNgrok && os.platform() == 'win32' && fs.existsSync(configuration.ngrokBinPath)) { + if(configuration.useNgrok + && os.platform() == 'win32' + && fs.existsSync(path.join(configuration.ngrokBinPath, 'ngrok.exe')) + ) { const ngrok: any = await import('ngrok'); (async function() { configuration.ngrokEndpoint = await ngrok.connect({