Skip to content

Commit c9299f7

Browse files
committed
Add comment about activation
1 parent 1561709 commit c9299f7

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/plugins/setup.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ export default createPlugin(
168168
/////////////////////////////////////////////////////////////////////
169169
progress.report({ message: "Checking LocalStack license..." });
170170

171+
// If an auth token has just been obtained or LocalStack has never been started,
172+
// then there will be no license info to be reported by `localstack license info`.
173+
// Also, an expired license could be cached.
174+
// Activating the license pre-emptively to know its state during the setup process.
171175
await execLocalStack(["license", "activate"], {
172176
outputChannel,
173177
});
@@ -183,9 +187,12 @@ export default createPlugin(
183187
message:
184188
"License is not valid or not assigned. Open License settings page to activate it.",
185189
});
190+
186191
commands.executeCommand("localstack.openLicensePage");
192+
187193
await checkLicenseUntilValid(outputChannel);
188194
}
195+
//TODO add telemetry
189196

190197
/////////////////////////////////////////////////////////////////////
191198
progress.report({

src/utils/promises.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import pMinDelay from "p-min-delay";
22

33
/**
4-
* Setting up a minimum wait time of 1s allows users
4+
* Setting up a minimum wait time allows users
55
* to visually grasp the text before it goes away, if
6-
* the task was fast (less than 0.5s).
6+
* the task was faster than the minimum wait time.
77
*/
88
const MIN_TIME_BETWEEN_STEPS_MS = 500;
99

0 commit comments

Comments
 (0)