From 3f1a6a8e4a509c4c8c16d96286f105506c9c4153 Mon Sep 17 00:00:00 2001 From: Per Date: Wed, 2 Jan 2019 08:21:43 +0100 Subject: [PATCH] stricter CLI mode check (look for arguments in a whitelist) --- src/main/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index d5a07c4..3736cb8 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -433,11 +433,9 @@ app.on('ready', () => { let isCli = false const args = process.argv for (const arg of args) { - if (arg == 'help') { - isCli = true - } - if (arg.startsWith('-')) { + if (['-w', '-h', '-s', '-o', '-h', '--help', 'help'].indexOf(arg) >= 0) { isCli = true + break } }