-
Notifications
You must be signed in to change notification settings - Fork 169
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
fix: reliable deletion of node_modules #12822
fix: reliable deletion of node_modules #12822
Conversation
Set writable permission before deletion to handle symlinks properly.
This looks like a reversed approach i.e. fixing the issue after it has happened (files created without writable permission). What is causing the files to be created with the wrong permissions? |
Actually, setting write permission in the initial pass is an additional measure. It works without it also in my tests, but I added it as I am not sure if |
flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be unit tested?
I will wing together a unit test that deletes a directory containing some internal symbolic links, though it may be hard to get it to actually fail with the previous impl as the file visiting order is non-deterministic. |
…spurious failures
…iles keep permission
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Do not set permissions nor follow symlinks when deleting node_modules. Fixes #12810
Do not set permissions nor follow symlinks when deleting node_modules. Fixes #12810 Co-authored-by: Johannes Eriksson <[email protected]>
This ticket/PR has been released with platform 23.0.0.alpha4 and is also targeting the upcoming stable 23.0.0 version. |
Do not set permissions nor follow symlinks when
deleting node_modules.
Fixes #12810