From 7746e263384cd13b63ed9243a28fbe9e86bc926b Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 20 Apr 2017 12:11:10 +0900 Subject: [PATCH] set chromium_sandbox to true by default --- main/config.ts | 3 +++ main/index.ts | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/main/config.ts b/main/config.ts index 3bf6361..3a942d5 100644 --- a/main/config.ts +++ b/main/config.ts @@ -102,6 +102,9 @@ export default function loadConfig(): Promise { recommendConfigAndDie(CONFIG_FILE); } else { config.__DATA_DIR = DATA_DIR; + if (config.chromium_sandbox === undefined) { + config.chromium_sandbox = true; + } resolve(config); } } catch (e) { diff --git a/main/index.ts b/main/index.ts index 1f09183..e75fbe8 100644 --- a/main/index.ts +++ b/main/index.ts @@ -10,8 +10,8 @@ app.removeAllListeners(); const appReady = new Promise(resolve => app.once('ready', resolve)); process.on('unhandledRejection', (reason: string) => { - const msg = 'FATAL: Unhandled rejection! Reason: ' + reason - appReady.then(() => { + const msg = 'FATAL: Unhandled rejection! Reason: ' + reason; + appReady.then(() => dialog.showMessageBox({ type: 'error', buttons: ['OK'], @@ -19,7 +19,7 @@ process.on('unhandledRejection', (reason: string) => { }, () => { app.quit(); }) - }); + ); log.error(msg); });