diff --git a/src/configuration.ts b/src/configuration.ts index 5e9d24ab..bcfab294 100644 --- a/src/configuration.ts +++ b/src/configuration.ts @@ -185,13 +185,6 @@ function saveDiscoveredLambdas(lambdasListNew: LambdaResource[]) { for (const lambda of lambdasListNew) { addLambda(lambda); } - - Logger.log('Found the following Lambdas to debug:'); - Logger.log( - ` - ${getLambdasFiltered() - .map((f) => `${f.functionName} code: ${f.codePath}`) - .join('\n - ')}`, - ); } } diff --git a/src/lldebugger.ts b/src/lldebugger.ts index 49d93e6a..11f89038 100755 --- a/src/lldebugger.ts +++ b/src/lldebugger.ts @@ -76,6 +76,15 @@ async function run() { await Configuration.discoverLambdas(); + if (!Configuration.config.remove) { + Logger.log('Found the following Lambdas to debug:'); + Logger.log( + ` - ${Configuration.getLambdasFiltered() + .map((f) => `${f.functionName} code: ${f.codePath}`) + .join('\n - ')}`, + ); + } + if (Configuration.config.remove) { const removalChanges = await InfraDeploy.getInfraChangesForRemoving();