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

fix: use node cp function for more robust copying in packito #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KW-M
Copy link

@KW-M KW-M commented Nov 24, 2024

Fix issues

Currently copying folders on macs when the destination folder doesn't exist yet results in the error "Error: ENOTSUP: operation not supported on socket, copyfile" The folder is definitely a folder, not a socket. This node bug pops up random places when anything with the filesystem is weird like symlinks, network shares, and in this case macos being weird.

Description

  • Now uses fs.cp to copy files and folders which is much more robust to weird files, folders and will properly follow symlinks. - Will fallback to fs.copyFile when fs.cp is unsupported (node < 16.7).
  • Added log message when a copy error occurs

Check List

  • [ x ] respect code conventions and usages
  • [ x ] tests and 100% coverage
  • [ x ] well documented
  • [ x ] self review

Review targets:

  • nodejs / npm / yarn

Thanks for making this handy tool!

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.

1 participant