Skip to content

Commit 3f1a6a8

Browse files
committed
stricter CLI mode check (look for arguments in a whitelist)
1 parent ca86836 commit 3f1a6a8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/index.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,9 @@ app.on('ready', () => {
433433
let isCli = false
434434
const args = process.argv
435435
for (const arg of args) {
436-
if (arg == 'help') {
437-
isCli = true
438-
}
439-
if (arg.startsWith('-')) {
436+
if (['-w', '-h', '-s', '-o', '-h', '--help', 'help'].indexOf(arg) >= 0) {
440437
isCli = true
438+
break
441439
}
442440
}
443441

0 commit comments

Comments
 (0)