Skip to content

add support for symlinking (junctions) on win32#87

Merged
arturadib merged 2 commits intoshelljs:masterfrom
jamon:master
Oct 3, 2013
Merged

add support for symlinking (junctions) on win32#87
arturadib merged 2 commits intoshelljs:masterfrom
jamon:master

Conversation

@jamon
Copy link
Contributor

@jamon jamon commented Sep 27, 2013

No description provided.

@arturadib
Copy link
Collaborator

Hi! Thanks for the patch. Out of curiosity- Why is junction the default for Windows?

PS: The patch is not passing the tests because it's missing require('os').

@jamon
Copy link
Contributor Author

jamon commented Oct 3, 2013

Hi there,

I defaulted to junction because it's the only link that node.js supports for windows. The current behavior under windows is that if a link is detected while copying it will error when it reaches the link, and skip copying it entirely. Making it default to junction causes will likely make it closer to what the user would expect.

My specific use case is using cordova (Mobile app framework) which leverages your code to synchronize the file tree from the main set of files to the directories for each platform (android, ios, windows phone, etc). It works fine for most scenarios, but I wanted to have the source directory have links to other locations (think like project dependencies). I was thinking I was going to have to add symlink support to shelljs entirely, but was pleasantly surprised to see it already supported it, and it just needed a quick patch to make it work on windows.

I'm not super proficient with github's pull request system, but I'll make an attempt at updating it to pass tests and re-submit.

Thanks,
Jamon

arturadib added a commit that referenced this pull request Oct 3, 2013
add support for symlinking (junctions) on win32
@arturadib arturadib merged commit 763e359 into shelljs:master Oct 3, 2013
@jamon jamon mentioned this pull request Feb 4, 2014
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

Successfully merging this pull request may close these issues.

3 participants