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

Better error message for src;dest #39

Open
TwitchBronBron opened this issue Jul 10, 2020 · 0 comments
Open

Better error message for src;dest #39

TwitchBronBron opened this issue Jul 10, 2020 · 0 comments

Comments

@TwitchBronBron
Copy link
Member

Could we have better error messages for certain types of invalid src;dest objects? For example:

src is file and dest is dir

`` { src: "../manifest", dest: "./"}``` This one should be easy to detect. We could run src` through the `glob.hasMagic` method, and if it's not a magic string, check for `fsExtra.isFile` or `fsExtra.isDir`. Then, we know for sure that the path on the right needs to be a path to a file, or if referencing a dir, throw an error saying directories can't be referenced directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant