-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Fix static dirs targeting same destination #19064
Conversation
@ndelangen eslint is very unhappy the way I solved this Though. I don't see the point here. The function above uses
which creates a map of promises and awaits them (technically also a loop with awaits in it?) I targeted "main" because of the restructuring in "next". I was not able to build the angular-cli example |
06e0152
to
63e28f3
Compare
Using forEach with await in the callback does not work. Changing it to a for-of loop handles the async staticDirs copy task correctly without creating a race-condition on writing to the same target directory. Fixes #16732
63e28f3
to
ed495aa
Compare
Issue: #16732
What I did
The previous implementation caused a race-condition if two assets target the same destination
With this change, one staticDir after another gets copied without conflicting in a race condition
How to test
yarn build-storybook
The error in the mentioned issue should appear (mkdir file already exists)