@@ -17,7 +17,13 @@ import { minDelay } from "../utils/promises.ts";
1717
1818export default createPlugin (
1919 "setup" ,
20- ( { context, outputChannel, setupStatusTracker, telemetry } ) => {
20+ ( {
21+ context,
22+ outputChannel,
23+ setupStatusTracker,
24+ localStackStatusTracker,
25+ telemetry,
26+ } ) => {
2127 context . subscriptions . push (
2228 commands . registerCommand (
2329 "localstack.setup" ,
@@ -219,16 +225,29 @@ export default createPlugin(
219225 await minDelay ( Promise . resolve ( ) ) ;
220226
221227 /////////////////////////////////////////////////////////////////////
222- window
223- . showInformationMessage ( "LocalStack is ready to start" , {
224- title : "Start LocalStack" ,
225- command : "localstack.start" ,
226- } )
227- . then ( ( selection ) => {
228- if ( selection ) {
229- commands . executeCommand ( selection . command ) ;
230- }
231- } ) ;
228+ if ( localStackStatusTracker . status ( ) === "running" ) {
229+ window
230+ . showInformationMessage ( "LocalStack is running." , {
231+ title : "View Logs" ,
232+ command : "localstack.viewLogs" ,
233+ } )
234+ . then ( ( selection ) => {
235+ if ( selection ) {
236+ commands . executeCommand ( selection . command ) ;
237+ }
238+ } ) ;
239+ } else {
240+ window
241+ . showInformationMessage ( "LocalStack is ready to start." , {
242+ title : "Start LocalStack" ,
243+ command : "localstack.start" ,
244+ } )
245+ . then ( ( selection ) => {
246+ if ( selection ) {
247+ commands . executeCommand ( selection . command ) ;
248+ }
249+ } ) ;
250+ }
232251
233252 telemetry . track ( {
234253 name : "setup_ended" ,
0 commit comments