-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use copy instead of rename if temp directory is on a different device #17
Use copy instead of rename if temp directory is on a different device #17
Conversation
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.
Hey @bryanwood thanks for the PR. I'm glad you caught this bug. I'm away from my Windows box right now so I can't fully test this but I have left some comments on the PR that I think will get this in a state in which we can merge.
Have addressed the comments and learnt today that node has had APIs for doing recursive directory copying for a while now 😅. There's another PR #18 that makes the tests run on Windows. |
@bryanwood this is great, thanks for making those changes. I merged #18 into main. Can you pull those changes into this branch? That way all the tests will run clean on GitHub. |
…rent-filesystem-roots
Looks like |
@bryanwood I've pushed a new branch https://github.com/enhance-dev/create/tree/use-copy-when-different-filesystem-roots which has all your commits plus my own implementation of |
Have tested this locally and it works ^^. |
@bryanwood thanks for the confirmation. I've pushed the code from my branch with the node 14 copy sync implementation and released an |
Running
npx "@enhance/create@latest" ./myproject -y
on Windows when the temp directory isn't on the same disk/device as the project directory fails withError: EXDEV: cross-device link not permitted
.Using copySync instead of renameSync fixes the scenario but I'm not sure if the change in this PR is a good idea or not.