Skip to content

Commit

Permalink
Merge pull request #7195 from mook-as/path-management/no-write-on-quit
Browse files Browse the repository at this point in the history
background: Don't trigger settings update actions at shutdown
  • Loading branch information
jandubois authored Jul 16, 2024
2 parents a4fe2d1 + b8a2854 commit c5694ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ mainEvents.on('settings-update', async(newSettings) => {
}
k8smanager.debug = runInDebugMode;

if (gone) {
console.debug('Suppressing settings-update because app is quitting');

return;
}

await setPathManager(newSettings.application.pathManagementStrategy);
await pathManager.enforce();

Expand Down
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/utils/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class Log {
}

protected logWithDate(method: consoleKey, message: any, optionalParameters: any[]) {
this.console[method](`%s: ${ message }`, new Date(), ...optionalParameters);
this.console[method](`%s: ${ message }`, new Date().toISOString(), ...optionalParameters);
}

async sync() {
Expand Down

0 comments on commit c5694ca

Please sign in to comment.