-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Friendly error messages for VCS failures #778
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
Friendly error messages for VCS failures #778
Conversation
Single quotes per standards and doctoring cleanup
@@ -113,3 +113,26 @@ class RepositoryNotFound(CookiecutterException): | |||
""" | |||
Raised when the specified cookiecutter repository doesn't exist. | |||
""" | |||
|
|||
|
|||
class RepositoryCloneFailed(CookiecutterException): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Current coverage is 100%@@ master #778 diff @@
====================================
Files 14 14
Lines 591 600 +9
Methods 0 0
Messages 0 0
Branches 0 0
====================================
+ Hits 591 600 +9
Misses 0 0
Partials 0 0
|
BRANCH_ERRORS = [ | ||
'error: pathspec', | ||
'unknown revision', | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this working for both git and mercurial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, here are the actual error messages: https://github.com/audreyr/cookiecutter/pull/778/files/55f6f0215a5293b8dc6baafb978e85bc725ffb45#diff-8327dc289ba1c55ec5be92a9f27829ffR186
658f544
to
5351a7a
Compare
@@ -115,9 +123,29 @@ def clone(repo_url, checkout=None, clone_to_dir=".", no_input=False): | |||
prompt_and_delete_repo(repo_dir, no_input=no_input) | |||
|
|||
if repo_type in ['git', 'hg']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not required as we run identify_repo
before that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, will fix.
Great work @michaeljoseph! 👏 |
🎉 |
Fixes #776