Skip to content

Commit 8803647

Browse files
fix: New CDK version
1 parent 8b85714 commit 8803647

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/frameworks/cdkFramework.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,12 @@ export class CdkFramework implements IFramework {
363363
),
364364
)
365365
) {
366-
const codeToFind = 'super(scope,id),this.requestDestinationArn=!1;';
366+
let codeToFind = 'super(scope,id),this.requestDestinationArn=!1;';
367+
368+
if (!contents.includes(codeToFind)) {
369+
// newer CDK version
370+
codeToFind = 'super(scope,id);';
371+
}
367372

368373
if (!contents.includes(codeToFind)) {
369374
throw new Error(`Can not find code to inject in ${args.path}`);

0 commit comments

Comments
 (0)