1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Resolves #7889: Add support for --safe-mode command line flag (#7919)

This commit is contained in:
Arun Kumar 2023-03-14 17:16:21 +05:30 committed by GitHub
parent df1e298c84
commit 6a3bf51084
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,6 +192,12 @@ export default class BaseApplication {
continue; continue;
} }
if (arg === '--safe-mode') {
matched.isSafeMode = true;
argv.splice(0, 1);
continue;
}
if (arg === '--open-dev-tools') { if (arg === '--open-dev-tools') {
Setting.setConstant('flagOpenDevTools', true); Setting.setConstant('flagOpenDevTools', true);
argv.splice(0, 1); argv.splice(0, 1);
@ -829,6 +835,10 @@ export default class BaseApplication {
appLogger.info(`Client ID: ${Setting.value('clientId')}`); appLogger.info(`Client ID: ${Setting.value('clientId')}`);
if (initArgs?.isSafeMode) {
Setting.setValue('isSafeMode', true);
}
if (Setting.value('firstStart')) { if (Setting.value('firstStart')) {
// If it's a sub-profile, the locale must come from the root // If it's a sub-profile, the locale must come from the root
// profile. // profile.