aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe HAMERLING <chamerling@linagora.com>2020-06-03 18:00:24 +0200
committerSaúl Ibarra Corretgé <s@saghul.net>2020-06-09 11:38:06 +0200
commitb662c93ac76eff9ffc989458df7d36dfb289007b (patch)
tree596047671d5fc0d20cfbd28d3322234c298b8c61
parent212d8cb92b3e0c69f2adca89cab8c8cfd2eccc8a (diff)
Add Application command line flag support for devtools
-rw-r--r--README.md2
-rw-r--r--main.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8b35d9d..58ff8f3 100644
--- a/README.md
+++ b/README.md
@@ -75,6 +75,8 @@ It can also be displayed automatically from the `SHOW_DEV_TOOLS` environment var
SHOW_DEV_TOOLS=true npm start
```
+or from the application `--show-dev-tools` command line flag.
+
#### Building the production distribution
```bash
diff --git a/main.js b/main.js
index 285c84f..296741d 100644
--- a/main.js
+++ b/main.js
@@ -22,7 +22,7 @@ const path = require('path');
const URL = require('url');
const config = require('./app/features/config');
-const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS);
+const showDevTools = Boolean(process.env.SHOW_DEV_TOOLS) || (process.argv.indexOf('--show-dev-tools') > -1);
// We need this because of https://github.com/electron/electron/issues/18214
app.commandLine.appendSwitch('disable-site-isolation-trials');