Skip to content

Commit d64ca89

Browse files
committed
wip
1 parent 96add94 commit d64ca89

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/plugins/manage.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { commands } from "vscode";
1+
import { commands, window } from "vscode";
22

33
import { createPlugin } from "../plugins.ts";
44
import {
@@ -9,7 +9,7 @@ import {
99

1010
export default createPlugin(
1111
"manage",
12-
({ context, outputChannel, telemetry }) => {
12+
({ context, outputChannel, telemetry, localStackStatusTracker }) => {
1313
context.subscriptions.push(
1414
commands.registerCommand("localstack.viewLogs", () => {
1515
outputChannel.show(true);
@@ -18,12 +18,22 @@ export default createPlugin(
1818

1919
context.subscriptions.push(
2020
commands.registerCommand("localstack.start", () => {
21+
if (localStackStatusTracker.status() !== "stopped") {
22+
window.showInformationMessage("LocalStack is already running.");
23+
return;
24+
}
25+
localStackStatusTracker.forceStarting();
2126
void startLocalStack(outputChannel, telemetry);
2227
}),
2328
);
2429

2530
context.subscriptions.push(
2631
commands.registerCommand("localstack.stop", () => {
32+
if (localStackStatusTracker.status() !== "running") {
33+
window.showInformationMessage("LocalStack is not running.");
34+
return;
35+
}
36+
localStackStatusTracker.forceStopping();
2737
void stopLocalStack(outputChannel, telemetry);
2838
}),
2939
);

src/utils/localstack-status.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export async function createLocalStackStatusTracker(
3434
const setStatus = (newStatus: LocalStackStatus) => {
3535
if (status !== newStatus) {
3636
status = newStatus;
37-
outputChannel.debug(`[localstack.status]: ${status}`);
3837
void emitter.emit(status);
3938
}
4039
};

0 commit comments

Comments
 (0)