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

Create symlinks instead of junctions on Windows? #36

Open
hoegge opened this issue May 18, 2018 · 4 comments
Open

Create symlinks instead of junctions on Windows? #36

hoegge opened this issue May 18, 2018 · 4 comments

Comments

@hoegge
Copy link

hoegge commented May 18, 2018

On windows, the junctions created by linklocal means that git clean does not only delete the symlinks (junctions) but also the files in the linked folders, which then prevens the use of git clean with linklocal / yarn. This is apparently not the case on UNIX.

Would it be possible to change linklocal to create symlinks on Windows instead (which does exist in the NTFS filesystem now) (see mklink documentation)?

As documented here https://www.bountysource.com/issues/990899-git-clean-d-deletes-files-in-junctioned-directories-on-windows git clean -df will delete files in folders linked by junctions. I have tried the same thing using mlink /D link target instead, and then files in the linked folder is not deleted.

Thanks

@timoxley
Copy link
Owner

I have never used node on windows, if you can submit a pull request that adds a flag for toggling symlinks/junctions i would accept that

@hoegge
Copy link
Author

hoegge commented May 22, 2018

Ok. Requires Node 8.10.0 or higher to work (libuv 1.19.1 needed for symlinks to work on Windows). Will come back with pull request

@timoxley
Copy link
Owner

@hoegge is this still an issue?

@hoegge
Copy link
Author

hoegge commented Aug 30, 2018

Yes - I believe so. I considered looking into changing it myself, but didn’t have the time. So unless someone else have fixed it I think it would be - can test at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants