cpy: Error when glob matches directory

Currently it throws an error (EISDIR) when the glob matches a directory. I want to copy all files and directory structure to another directory. I am using cpy(['**/*'], '../output/dist', { cwd: 'assets', parents: true }, cb);. This does not work since **/* also matches the directory names.

I could make a PR to fix this if you know what behavior we should have. Should we just ignore empty directories or create them? I’m currently leaning toward creating any directories, which I think is the most intuitive.

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 17 (4 by maintainers)

Commits related to this issue

Most upvoted comments

nodir is not currently an option for CLI