Skip to content

Commit

Permalink
Desktop: Resolves #7889: Add support for --safe-mode command line f…
Browse files Browse the repository at this point in the history
…lag (#7919)
  • Loading branch information
palerdot committed Mar 14, 2023
1 parent df1e298 commit 6a3bf51
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/lib/BaseApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ export default class BaseApplication {
continue;
}

if (arg === '--safe-mode') {
matched.isSafeMode = true;
argv.splice(0, 1);
continue;
}

if (arg === '--open-dev-tools') {
Setting.setConstant('flagOpenDevTools', true);
argv.splice(0, 1);
Expand Down Expand Up @@ -829,6 +835,10 @@ export default class BaseApplication {

appLogger.info(`Client ID: ${Setting.value('clientId')}`);

if (initArgs?.isSafeMode) {
Setting.setValue('isSafeMode', true);
}

if (Setting.value('firstStart')) {
// If it's a sub-profile, the locale must come from the root
// profile.
Expand Down

0 comments on commit 6a3bf51

Please sign in to comment.