-
Notifications
You must be signed in to change notification settings - Fork 775
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 error when a subdirectory is a symbol link #937
Comments
Now I am doing a workaround like this, and it seems to work, but ideally the library should(if it could) handle this situation: const fse = require('fs-extra');
const filter = (src, dest) => {
const destStats = fse.existsSync(dest) && fse.lstatSync(dest);
return !destStats?.isSymbolicLink?.();
};
fse.copySync('src/', 'build/', { filter }); |
The error message isn't terribly clear here, but basically |
@RyanZim yeah it works exactly as what you said. So is there a way to overwrite a symbol link in this case? |
Not directly; your best bet would be to |
fs-extra
version: 10.0.0I have the following directory structure (src/lib is a symbol link):
And build.js:
Basically I want to copy everything inside src to build, and I only want to copy the src/lib as a symbol link to build, not the content. When I ran build.js, I got the following error:
I am aware of the
dereference: true
option, but that would copy everything from the lib to the build directory, which is not what I wanted.The text was updated successfully, but these errors were encountered: