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

Throw if the given source file does not exist #68

Merged
merged 13 commits into from
Sep 22, 2019

Conversation

whitecrownclown
Copy link
Contributor

@whitecrownclown whitecrownclown commented Jun 19, 2019

index.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

The behavior needs to be documented in the readme and in https://github.com/sindresorhus/cpy/blob/master/index.d.ts

index.js Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@sindresorhus sindresorhus changed the title Throw on no file found Throw if the given source file does not exist Aug 3, 2019
test.js Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Can you add a test where a glob pattern doesn't match any files? I think the expected behavior there is that it should not throw.

@whitecrownclown
Copy link
Contributor Author

@sindresorhus I've added the test and the previous implementation did throw so I added hasGlob to exclude glob patterns.

test.js Show resolved Hide resolved
@sindresorhus sindresorhus merged commit c4014c0 into sindresorhus:master Sep 22, 2019
whitecrownclown pushed a commit to whitecrownclown/cpy that referenced this pull request Feb 16, 2020
sindresorhus pushed a commit that referenced this pull request Feb 21, 2020
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.

Does not throw on non-existing file
2 participants