-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
OS: ubuntu 10.10
I have ~/bin prepended to my path.
I also have a ~/bin/git folder where all my git commands are stored.
pip tries to execute ~/bin/git (the folder) instead of /usr/bin/git (the file).
This fixes my problem:
diff -r 14ee6b8d7b89 pip/util.py
--- a/pip/util.py Sun Feb 13 16:54:56 2011 -0200
+++ b/pip/util.py Wed Mar 02 03:36:31 2011 +0100
@@ -86,9 +86,9 @@
for ext in pathext:
# then including the extension
cmd_path_ext = cmd_path + ext
- if os.path.exists(cmd_path_ext):
+ if os.path.exists(cmd_path_ext) and os.path.isfile(cmd_path_ext):
return cmd_path_ext
- if os.path.exists(cmd_path):
+ if os.path.exists(cmd_path) and os.path.isfile(cmd_path):
return cmd_path
return None
I'm not very used to python yet or the platforms it supports so I assumed that os.path.isfile() will work on all platforms, you probably have much deeper knowledge about this.
Sorry that I haven't got the time to register an account here or learn/setup mercurial atm.
Regards, Thomas Frössman [email protected]
- Bitbucket: https://bitbucket.org/ianb/pip/issue/221
- Originally Reported By: Anonymous
- Originally Created At: 2011-03-02 03:56:09
Metadata
Metadata
Assignees
Labels
auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior