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

Inform users when vcs's are not in the path. #4461

Merged
merged 9 commits into from May 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions news/4461.bugfix
@@ -0,0 +1,4 @@
This fixes an issue where when someone who tries to use git
with pip but pip can't because git is not in the path
environment variable. This clarifies the error given to
suggest to the user what might be wrong.
5 changes: 4 additions & 1 deletion pip/vcs/__init__.py
Expand Up @@ -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))
else:
raise # re-raise exception if a different error occurred

Expand Down