Skip to content

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