1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Allow Electron debugging flag (#2084)

* Add check for Electron's cli arg --remote-debugging-port and discard it to prevent cli arg parser raising Unknown flag exception.

* Jump to next iteration once arg processed

* Allow only the strict form of flag as --x=y
This commit is contained in:
barbowza 2019-11-13 21:38:09 +00:00 committed by Laurent Cozic
parent de214c8695
commit 2d5d8ceb1d

View File

@ -170,6 +170,12 @@ class BaseApplication {
continue;
}
if (arg.indexOf('--remote-debugging-port=') === 0) {
// Electron-specific flag used for debugging - ignore it. Electron expects this flag in '--x=y' form, a single string.
argv.splice(0, 1);
continue;
}
if (arg.length && arg[0] == '-') {
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
} else {