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
- Added nodir option to cli. — committed to chimon2000/cpy-cli by deleted user 8 years ago
- gulp copy task: add options to allow for subdirs https://github.com/sindresorhus/cpy/issues/10 — committed to FriendsOfREDAXO/redaxo-mit-bimmelbam by schuer 6 years ago
nodir
is not currently an option for CLI