Skip to content

Commit

Permalink
stricter CLI mode check (look for arguments in a whitelist)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuffmatic committed Jan 2, 2019
1 parent ca86836 commit 3f1a6a8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 3f1a6a8

Please sign in to comment.