Skip to content

Commit a716aec

Browse files
committed
Add provider disposable into subscriptions to be disposed on deactivation
Signed-off-by: Denis Golovin <[email protected]>
1 parent 373574e commit a716aec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
8383

8484
await initMenu(extensionContext);
8585

86-
extensionApi.authentication.registerAuthenticationProvider(
86+
const providerDisposable = extensionApi.authentication.registerAuthenticationProvider(
8787
'redhat.autentication-provider',
8888
'Red Hat', {
8989
onDidChangeSessions: onDidChangeSessions.event,
@@ -103,6 +103,7 @@ export async function activate(extensionContext: extensionApi.ExtensionContext):
103103
onDidChangeSessions.fire({removed: [session]});
104104
}
105105
});
106+
extensionContext.subscriptions.push(providerDisposable);
106107

107108
const SignInCommand = extensionApi.commands.registerCommand('redhat.authentication.signin', async () => {
108109
loginService = await getAutenticatonService();

0 commit comments

Comments
 (0)