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

Add no-dir flag #5

Closed
wants to merge 1 commit into from
Closed

Add no-dir flag #5

wants to merge 1 commit into from

Conversation

kevva
Copy link
Contributor

@kevva kevva commented Jun 13, 2016

Related to sindresorhus/cpy#10. When copying all files and directories in a directory you'll end up with a EISDIR failure. And since nodir wasn't passed there was no way to fix it.

@kevva
Copy link
Contributor Author

kevva commented Jun 13, 2016

Hmm, doesn't seem to work fully since --no-dir gets treated as a string so it have to matched as 'false'.

@kevva
Copy link
Contributor Author

kevva commented Jun 13, 2016

Should be fixed now. I think overwrite needs fixing as well.

@sindresorhus
Copy link
Owner

Remind me, why is this needed again? Seems like it should just be default behavior.

// @schnittstabil

@schnittstabil
Copy link
Collaborator

@sindresorhus The problem:
**/* also matches directories, which isn't expected by some (or most?) users.
On the other side, a --recusive option needs patterns to match directories, especially in case of empty directories.

I'm working on --recusive for some time, but sadly the current version is far too complicated atm.

@kevva s PR won't fix sindresorhus/cpy#10, but alleviates that problem, and because cpy already supports nodir due to globby/node-glob, I'm fine with it.

@sindresorhus Please also note #3 ("Added nodir option to cli.") of @chimon2000.

@kevva
Copy link
Contributor Author

kevva commented Jun 20, 2016

Yeah, currently this module is unusable if you have files nested in directories since it'll error out when trying to read the dirs.

@danielweck
Copy link

Is there anything blocking this PR? This would fix:
sindresorhus/cpy#10
sindresorhus/cpy#40
#10
...right?

@kevva
Copy link
Contributor Author

kevva commented Mar 5, 2018

Bumping globby in https://github.com/sindresorhus/cpy will fix this issue.

@danielweck
Copy link

Thanks @kevva
...but in this case could you please clarify whether using cpy-cli without the nodir command line option will behave as if folders were ignored by default when using the file glob **/* or **/*.*?

@kevva
Copy link
Contributor Author

kevva commented Mar 5, 2018

@danielweck, yes, they'll be ignored.

@revelt
Copy link

revelt commented Feb 7, 2019

hi guys! Sorry to bother but this PR seems to be gathering dust a little bit. What is needed to move it forward? Or should we just delete it?

@sindresorhus
Copy link
Owner

Closing in favor of #10

@sindresorhus sindresorhus deleted the nodir branch June 11, 2019 06:06
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.

5 participants