mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 00:27:40 +00:00
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
This commit is contained in:
parent
440297199f
commit
e9175de00f
1 changed files with 4 additions and 1 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue