mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Electron: Fixes #480: Ignore invalid flag automatically passed by macOS
This commit is contained in:
parent
5f32c6466a
commit
4c210d0956
@ -143,6 +143,14 @@ class BaseApplication {
|
|||||||
continue;
|
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] == '-') {
|
if (arg.length && arg[0] == '-') {
|
||||||
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
|
throw new JoplinError(_('Unknown flag: %s', arg), 'flagError');
|
||||||
} else {
|
} else {
|
||||||
|
@ -91,9 +91,10 @@ async function main(argv) {
|
|||||||
|
|
||||||
setReadmeContent(content);
|
setReadmeContent(content);
|
||||||
|
|
||||||
console.info("git pull && git add -A && git commit -m 'Update readme downloads' && git push")
|
// console.info("git pull && git add -A && git commit -m 'Update readme downloads' && git push")
|
||||||
}
|
}
|
||||||
|
|
||||||
main(process.argv).catch((error) => {
|
main(process.argv).catch((error) => {
|
||||||
console.error('Fatal error', error);
|
console.error('Fatal error', error);
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user