File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -192,8 +192,16 @@ export default createPlugin(
192192
193193 commands . executeCommand ( "localstack.openLicensePage" ) ;
194194
195- await activateLicenseUntilValid ( outputChannel ) ;
195+ await activateLicenseUntilValid (
196+ outputChannel ,
197+ cancellationToken ,
198+ ) ;
199+ }
200+
201+ if ( cancellationToken . isCancellationRequested ) {
202+ return ;
196203 }
204+
197205 //TODO add telemetry
198206
199207 /////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change 1- import type { LogOutputChannel } from "vscode" ;
1+ import type { CancellationToken , LogOutputChannel } from "vscode" ;
22
33import { execLocalStack } from "./cli.ts" ;
44
@@ -29,8 +29,12 @@ export async function activateLicense(outputChannel: LogOutputChannel) {
2929
3030export async function activateLicenseUntilValid (
3131 outputChannel : LogOutputChannel ,
32+ cancellationToken : CancellationToken ,
3233) : Promise < void > {
3334 while ( true ) {
35+ if ( cancellationToken . isCancellationRequested ) {
36+ break ;
37+ }
3438 const licenseIsValid = await checkIsLicenseValid ( outputChannel ) ;
3539 if ( licenseIsValid ) {
3640 break ;
You can’t perform that action at this time.
0 commit comments