fix(win32): Ignore path in argv when --squirrel flag is present

This commit is contained in:
Ben Gotow 2016-05-18 16:08:58 -07:00
parent 29b448989c
commit a8f54c25df

View file

@ -1,4 +1,5 @@
/* eslint dot-notation: 0 */
/* eslint global-require: 0 */
global.shellStartTime = Date.now();
const app = require('electron').app;
@ -81,7 +82,7 @@ const parseCommandLine = (argv) => {
const pathsToOpen = [];
// On Windows and Linux, mailto and file opens are passed as the last argv
if (argv.length > 1) {
if (argv.length > 1 && !argv.join(' ').includes('--squirrel')) {
const lastArg = argv[argv.length - 1];
if (lastArg.startsWith('mailto:')) {
urlsToOpen.push(lastArg);