mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +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() {
|
async init() {
|
||||||
if (!(await ipc.platform.sshAgent.isLoaded())) {
|
this.desktopSettingsService.sshAgentEnabled$
|
||||||
|
.pipe(
|
||||||
|
concatMap(async (enabled) => {
|
||||||
|
if (!(await ipc.platform.sshAgent.isLoaded()) && enabled) {
|
||||||
await ipc.platform.sshAgent.init();
|
await ipc.platform.sshAgent.init();
|
||||||
}
|
}
|
||||||
|
}),
|
||||||
|
takeUntil(this.destroy$),
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
|
||||||
await this.initListeners();
|
await this.initListeners();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user