From 0934656672820c62b9ef0e1f02ec29952097a81f Mon Sep 17 00:00:00 2001 From: "Marcin J. Puhacz" Date: Wed, 29 Sep 2021 16:53:18 +0200 Subject: [PATCH] fix(core): make skip flag use stack id instead of stack name --- packages/@aws-cdk/core/lib/asset-staging.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/core/lib/asset-staging.ts b/packages/@aws-cdk/core/lib/asset-staging.ts index c948bc377c9a6..3693c5f7a44b6 100644 --- a/packages/@aws-cdk/core/lib/asset-staging.ts +++ b/packages/@aws-cdk/core/lib/asset-staging.ts @@ -189,7 +189,7 @@ export class AssetStaging extends CoreConstruct { if (props.bundling) { // Check if we actually have to bundle for this stack const bundlingStacks: string[] = this.node.tryGetContext(cxapi.BUNDLING_STACKS) ?? ['*']; - skip = !bundlingStacks.find(pattern => minimatch(Stack.of(this).stackName, pattern)); + skip = !bundlingStacks.find(pattern => minimatch(Stack.of(this).node.id, pattern)); const bundling = props.bundling; stageThisAsset = () => this.stageByBundling(bundling, skip); } else {