Skip to content

Commit 8389cfe

Browse files
committed
fix(toolkit-lib): wrap assembly in CachedCloudAssembly when caching is enabled
1 parent 28511f8 commit 8389cfe

File tree

1 file changed

+2
-3
lines changed
  • packages/@aws-cdk/toolkit-lib/lib/toolkit/private

1 file changed

+2
-3
lines changed

packages/@aws-cdk/toolkit-lib/lib/toolkit/private/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import type { SdkProvider } from '../../api/aws-auth/private';
3-
import type { ICloudAssemblySource } from '../../api/cloud-assembly';
3+
import { CachedCloudAssembly, type ICloudAssemblySource } from '../../api/cloud-assembly';
44
import { StackAssembly } from '../../api/cloud-assembly/private';
55
import type { IoHelper } from '../../api/io/private';
66
import type { PluginHost } from '../../api/plugin';
@@ -30,8 +30,7 @@ export async function assemblyFromSource(ioHelper: IoHelper, assemblySource: ICl
3030
}
3131

3232
if (cache) {
33-
const ret = new StackAssembly(await assemblySource.produce(), ioHelper);
34-
return ret;
33+
return new StackAssembly(new CachedCloudAssembly(await assemblySource.produce()), ioHelper);
3534
}
3635

3736
return new StackAssembly(await assemblySource.produce(), ioHelper);

0 commit comments

Comments
 (0)