File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
packages/@aws-cdk/toolkit-lib/lib Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ export class CachedDataSource implements NoticeDataSource {
7272
7373 private async save ( cached : CachedNotices ) : Promise < void > {
7474 try {
75+ await fs . ensureFile ( this . fileName ) ;
7576 await fs . writeJSON ( this . fileName , cached ) ;
7677 } catch ( e ) {
7778 await this . ioHelper . defaults . debug ( `Failed to store notices in the cache: ${ e } ` ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ export function cdkHomeDir() {
3434}
3535
3636export function cdkCacheDir ( ) {
37- return path . join ( cdkHomeDir ( ) , 'cache' ) ;
37+ const cacheDir = path . join ( cdkHomeDir ( ) , 'cache' ) ;
38+ fs . mkdirSync ( cacheDir , { recursive : true } ) ;
39+ return cacheDir ;
3840}
3941
4042/**
You can’t perform that action at this time.
0 commit comments