1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron: Fixes #480: Ignore invalid flag automatically passed by macOS

This commit is contained in:
Laurent Cozic
2018-05-02 15:51:33 +01:00
parent 5f32c6466a
commit 4c210d0956
2 changed files with 10 additions and 1 deletions

View File

@ -143,6 +143,14 @@ class BaseApplication {
continue;
}
if (arg.indexOf('-psn') === 0) {
// Some weird flag passed by macOS - can be ignored.
// https://github.com/laurent22/joplin/issues/480
// https://stackoverflow.com/questions/10242115
argv.splice(0, 1);
continue;
}
if (arg.length && arg[0] == '-') {
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
} else {