Skip to content

Commit 04716ee

Browse files
committed
add a nre condition using DefaultSelection.AllStacks
1 parent 73e8ac1 commit 04716ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/aws-cdk/lib/cxapp/cloud-assembly.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ export class CloudAssembly extends BaseStackAssembly {
103103
throw new ToolkitError('This app contains no stacks');
104104
}
105105

106-
if (allTopLevel) {
106+
if (allTopLevel && options.defaultBehavior === DefaultSelection.AllStacks) {
107+
return new StackCollection(this, stacks);
108+
} else if (allTopLevel) {
107109
return this.selectTopLevelStacks(stacks, topLevelStacks, options.extend);
108110
} else if (patterns.length > 0) {
109111
return this.selectMatchingStacks(stacks, patterns, options.extend);

0 commit comments

Comments
 (0)