mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
fix: only start ssh agent if it's enabled (#13464)
closes #13150 Co-authored-by: Bernd Schoolmann <mail@quexten.com>
This commit is contained in:
@@ -63,9 +63,16 @@ export class SshAgentService implements OnDestroy {
|
||||
) {}
|
||||
|
||||
async init() {
|
||||
if (!(await ipc.platform.sshAgent.isLoaded())) {
|
||||
await ipc.platform.sshAgent.init();
|
||||
}
|
||||
this.desktopSettingsService.sshAgentEnabled$
|
||||
.pipe(
|
||||
concatMap(async (enabled) => {
|
||||
if (!(await ipc.platform.sshAgent.isLoaded()) && enabled) {
|
||||
await ipc.platform.sshAgent.init();
|
||||
}
|
||||
}),
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe();
|
||||
|
||||
await this.initListeners();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user