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
Inform users when vcs's are not in the path. #4461
Changes from 7 commits
9a37000
f5ba12f
aafdb4c
947c3c1
87a19dd
cb1227e
1a9eac3
1f2df74
737ac35
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This fix clarifies the error given to suggest to the user | ||
what might be wrong. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still isn't wright, sorry - you need to think about how it would look in the larger What I was trying to suggest was that your original text:
needed to be changed because the revised error no longer explicitly told the user how to fix the issue, but rather suggested to the user how to check what the problem might be. So the text I suggested was intended as a possible replacement for the last sentence only. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,7 +327,10 @@ def run_command(self, cmd, show_stdout=True, cwd=None, | |
# errno.ENOENT = no such file or directory | ||
# In other words, the VCS executable isn't available | ||
if e.errno == errno.ENOENT: | ||
raise BadCommand('Cannot find command %r' % self.name) | ||
raise BadCommand( | ||
'Cannot find command %r - do you have ' | ||
'%r installed and in your ' | ||
'PATH?' % self.name % self.name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should not chain One question - did you test this? As it stands the code will fail. I was considering asking you to write a test for this, but it seemed like a lot of additional work for a simple change. But I'm now wondering. |
||
else: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have 2 instances of %r but only one argument. Either add a second copy of |
||
raise # re-raise exception if a different error occurred | ||
|
||
|
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 didn't mean literally just that text :-( It was just a suggestion on the way to express what had changed.
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.
Ah