Skip to content
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

less aggressive realpathSync #1503

Merged
merged 1 commit into from
Jul 1, 2023
Merged

less aggressive realpathSync #1503

merged 1 commit into from
Jul 1, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jul 1, 2023

The realpath checks were added because in some environments node_modules is symlinked and we need to account for that. But they also mean that if any directory that appears in the index isn't present it can cause a crash, and that can indeed happen when output from a previous build is still present and hasn't been updated yet.

This should hopefully achieve both goals by only resolving the top-level workingDir, and that only after proving that it's present.

Not doing realpath on every individual inner directory is OK because we control those.

The realpath checks were added because in some environments node_modules is symlinked and we need to account for that. But they also mean that if any directory that appears in the index isn't present it can cause a crash, and that can indeed happen when output from a previous build is still present and hasn't been updated yet.

This should hopefully achieve both goals by only resolving the top-level workingDir, and that only after proving that it's present.

Not doing realpath on every individual inner directory is OK because we control those.
@ef4 ef4 added the bug Something isn't working label Jul 1, 2023
@ef4 ef4 merged commit 5120323 into main Jul 1, 2023
194 checks passed
@ef4 ef4 deleted the realpath2 branch July 1, 2023 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant