File tree Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Expand file tree Collapse file tree 2 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,17 @@ async function run() {
52
52
return ;
53
53
}
54
54
55
- Logger . log (
56
- `Starting the debugger ${
57
- Configuration . config . observable
58
- ? 'in observable mode'
59
- : `(ID ${ Configuration . config . debuggerId } )`
60
- } ...`,
61
- ) ;
55
+ let message = `Starting the debugger ${
56
+ Configuration . config . observable
57
+ ? 'in observable mode'
58
+ : `(ID ${ Configuration . config . debuggerId } )`
59
+ } ...`;
60
+
61
+ if ( Configuration . config . remove ) {
62
+ message = `Removing Lambda Live Debugger${ Configuration . config . remove === 'all' ? ' including layer' : '' } ...` ;
63
+ }
64
+
65
+ Logger . log ( message ) ;
62
66
63
67
if ( Configuration . config . subfolder ) {
64
68
// change the current working directory to the subfolder for monorepos
@@ -70,9 +74,6 @@ async function run() {
70
74
await Configuration . discoverLambdas ( ) ;
71
75
72
76
if ( Configuration . config . remove ) {
73
- Logger . log (
74
- `Removing Lambda Live Debugger${ Configuration . config . remove === 'all' ? ' including layer' : '' } ...` ,
75
- ) ;
76
77
await InfraDeploy . removeInfrastructure ( ) ;
77
78
// await GitIgnore.removeFromGitIgnore();
78
79
// delete folder .lldebugger
@@ -89,6 +90,11 @@ async function run() {
89
90
return ;
90
91
}
91
92
93
+ if ( ! Configuration . getLambdas ( ) . length ) {
94
+ Logger . error ( 'No Lambdas found. Exiting...' ) ;
95
+ return ;
96
+ }
97
+
92
98
await InfraDeploy . deployInfrastructure ( ) ;
93
99
94
100
const folders = [
Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ async function getLambdas(config: LldConfig) {
53
53
Logger . verbose ( `Getting resources with '${ framework . name } ' framework` ) ;
54
54
resources = await framework . getLambdas ( config ) ;
55
55
56
- if ( config . function ) {
56
+ if ( config . function && ! config . remove ) {
57
+ // if we are removing the debugger, we don't want to filter by function name
57
58
const functionNameFilter = config . function . trim ( ) ;
58
59
resources = resources . filter (
59
60
// filter by function name, can use * as wildcard
You can’t perform that action at this time.
0 commit comments