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

Check for multiple src files in copy.js #247

Open
dangomania opened this issue May 27, 2024 · 0 comments
Open

Check for multiple src files in copy.js #247

dangomania opened this issue May 27, 2024 · 0 comments

Comments

@dangomania
Copy link

I noticed that when directory is passed as the src_path for copy.js, copy.js does not work as intended on NetBSD.

The copy.js checks the src_path with (Array.isArray(from) || !this.exists(from) || (globby.hasMagic(normalize(from)) && !options.noGlob), and !this.exists(from) returns null when "from" is a dir on Linux, but it returns non-null value (string representing files contained in the dir) on NetBSD.

This is because the behavior of "file.contents" used in exists.js differs on these platforms.

it seems that "fs.statSync(from).isDirectory()" should be added to the above condition so that copy.js works as intended on both platforms.

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

1 participant