Skip to content

Commit 4d2ddb8

Browse files
committed
refactor
1 parent be5d779 commit 4d2ddb8

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/plugins/manage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default createPlugin(
2020
commands.registerCommand("localstack.start", async () => {
2121
const cliPath = cliStatusTracker.cliPath();
2222
if (!cliPath) {
23-
window.showInformationMessage(
23+
void window.showInformationMessage(
2424
"LocalStack CLI could not be found. Please, run the setup wizard.",
2525
);
2626
return;
@@ -43,7 +43,7 @@ export default createPlugin(
4343
commands.registerCommand("localstack.stop", () => {
4444
const cliPath = cliStatusTracker.cliPath();
4545
if (!cliPath) {
46-
window.showInformationMessage(
46+
void window.showInformationMessage(
4747
"LocalStack CLI could not be found. Please, run the setup wizard.",
4848
);
4949
return;

src/plugins/setup.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ export default createPlugin(
4545
});
4646

4747
const cliPath = cliStatusTracker.cliPath();
48-
if (!cliPath) {
49-
void window.showErrorMessage(
50-
"LocalStack CLI is not configured. Please set it up before running the setup wizard.",
51-
);
52-
return;
53-
}
5448

5549
void window.withProgress(
5650
{
@@ -65,7 +59,7 @@ export default createPlugin(
6559
{
6660
const installationStartedAt = new Date().toISOString();
6761
const { cancelled, skipped } = await runInstallProcess({
68-
cliPath,
62+
cliPath: cliStatusTracker.cliPath(),
6963
progress,
7064
cancellationToken,
7165
outputChannel,
@@ -231,6 +225,14 @@ export default createPlugin(
231225
/////////////////////////////////////////////////////////////////////
232226
progress.report({ message: "Checking LocalStack license..." });
233227

228+
const cliPath = cliStatusTracker.cliPath();
229+
if (!cliPath) {
230+
void window.showErrorMessage(
231+
"LocalStack CLI is not configured. Please set it up before running the setup wizard.",
232+
);
233+
return;
234+
}
235+
234236
// If an auth token has just been obtained or LocalStack has never been started,
235237
// then there will be no license info to be reported by `localstack license info`.
236238
// Also, an expired license could be cached.

src/plugins/status-bar.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,8 @@ export default createPlugin(
112112
statusBarItem.text = `${icon} LocalStack: ${statusText}`;
113113

114114
statusBarItem.tooltip = "Show LocalStack commands";
115-
// statusBarItem.show();
116115
});
117116

118-
// refreshStatusBar();
119-
120117
localStackStatusTracker.onChange(() => {
121118
outputChannel.trace("[status-bar]: localStackStatusTracker changed");
122119
renderStatusBar();

0 commit comments

Comments
 (0)