Skip to content

Commit 84e964e

Browse files
committed
WIP Add license activation
TODO move to the right modules
1 parent af4c6d6 commit 84e964e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/plugins/setup.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { configureAwsProfiles } from "../utils/configure-aws.ts";
1212
import { runInstallProcess } from "../utils/install.ts";
1313
import { minDelay } from "../utils/promises.ts";
14+
import {execLocalStack} from "../utils/cli.ts";
1415

1516
export default createPlugin(
1617
({ context, outputChannel, setupStatusTracker, telemetry }) => {
@@ -167,7 +168,9 @@ export default createPlugin(
167168
/////////////////////////////////////////////////////////////////////
168169
progress.report({ message: "Checking LocalStack license..." });
169170

170-
//TODO try to activate the license first
171+
const licenseActivateResponse = await execLocalStack(["license", "activate"], {
172+
outputChannel,
173+
});
171174

172175
const licenseIsValid = await minDelay(
173176
checkIsLicenseValid(outputChannel),
@@ -252,7 +255,9 @@ async function checkLicenseUntilValid(
252255
if (licenseIsValid) {
253256
break;
254257
}
255-
//TODO try to activate the license
258+
const licenseActivateResponse = await execLocalStack(["license", "activate"], {
259+
outputChannel,
260+
});
256261

257262
// Wait 2 seconds before trying again
258263
await new Promise((resolve) => setTimeout(resolve, 2000));

0 commit comments

Comments
 (0)