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:
parent
de214c8695
commit
2d5d8ceb1d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user