Using __file__ was getting the wrong location.

__file__ is relative to pbr itself inside of a remote pip build.

Change-Id: I76215abadc8a1a95f5e82680593a856e71d262ec
This commit is contained in:
Monty Taylor 2013-03-29 00:31:58 +01:00
parent d0b083d28f
commit 79d5a6cc7d
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ def _run_shell_command(cmd, throw_on_error=False):
def _get_git_directory():
parent_dir = os.path.dirname(__file__)
parent_dir = os.path.dirname(os.curdir)
while True:
git_dir = os.path.join(parent_dir, '.git')
if os.path.exists(git_dir):