-
Notifications
You must be signed in to change notification settings - Fork 772
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
copySync throw error when directory has unreachable symlinks #765
Comments
quick fix
|
@manidlou Can you take a look at this? |
Sure thing! |
@lljxx1 can you give us a reproducible test case please? |
fundembp:alternatives fun$ ls -l
total 0
lrwxr-xr-x 1 fun staff 31 2 24 09:57 phar -> /code/.fun/root/usr/bin/phar7.0
lrwxr-xr-x 1 fun staff 47 2 24 09:57 phar.1.gz -> /code/.fun/root/usr/share/man/man1/phar7.0.1.gz
lrwxr-xr-x 1 fun staff 36 2 24 09:57 phar.phar -> /code/.fun/root/usr/bin/phar.phar7.0
lrwxr-xr-x 1 fun staff 52 2 24 09:57 phar.phar.1.gz -> /code/.fun/root/usr/share/man/man1/phar.phar7.0.1.gz
lrwxr-xr-x 1 fun staff 30 2 24 09:57 php -> /code/.fun/root/usr/bin/php7.0
lrwxr-xr-x 1 fun staff 34 2 24 09:57 php-cgi -> /code/.fun/root/usr/bin/php-cgi7.0
lrwxr-xr-x 1 fun staff 38 2 24 09:57 php-cgi-bin -> /code/.fun/root/usr/lib/cgi-bin/php7.0
lrwxr-xr-x 1 fun staff 50 2 24 09:57 php-cgi.1.gz -> /code/.fun/root/usr/share/man/man1/php-cgi7.0.1.gz
lrwxr-xr-x 1 fun staff 46 2 24 09:57 php.1.gz -> /code/.fun/root/usr/share/man/man1/php7.0.1.gz here is the example, the |
I've encounted this issue as well. Online demo reproducing the issue: https://repl.it/repls/OvalCruelApplets |
As a quick workaround to anyone who also found this issue but doesn't want to patch node modules locally, https://www.npmjs.com/package/ncp seems to be a fine alternative for copy. With that said, it seems the fix was just merged into v10, so hopefully this should be closed out soon! :) |
Fixed in #779 |
mac
v12.14.0
fs-extra
version:8.1.0
error line:
https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy-sync/copy-sync.js#L121
function
copyDirItem
stat.checkPathsSync
should be use fs.lstatSync when options:dereference
is falseThe text was updated successfully, but these errors were encountered: