Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): ensure output paths returned are unique (#18207)
It is possible for users to define multiple duplicate outputs in their project.json. This is leading to fs related issues like `ENOTEMPTY: directory not empty, rmdir`. The reason this occurs is that the src will tried to be copied to the cached directory in parallel for all output paths (even duplicated ones) and is the reason why these errors are seen sporadically. By ensuring output paths are unique, we only ever copy one path which resolves this issue. Note: There may still be an issue present if there is a glob that is overlapping another directory i.e: `cdk.out/*` and `cdk.out`, however have not been able to reproduce a fs error while testing. fixes #17277, #16337 ## Current Behavior If you have a project.json which has duplicate output entires, it is possible to receive fs related errors when the cache is being written to disk. ## Expected Behavior each output should only be copied once into the caches directory. ## Related Issue(s) #17277, #16337 Fixes #17277, #16337
- Loading branch information