diff options
author | Joshua Hesketh <josh@nitrotech.org> | 2015-06-03 23:01:30 +1000 |
---|---|---|
committer | Joshua Hesketh <josh@nitrotech.org> | 2015-06-04 14:13:46 +1000 |
commit | bad0b1fda232f7058112695fc63cbea5f278d142 (patch) | |
tree | 339ac579b473a1d12974cf649de4fc1507263878 | |
parent | a4b178d1f1248b6309c40d72eb6c03d53864377b (diff) | |
download | turbo-hipster-bad0b1fda232f7058112695fc63cbea5f278d142.tar.gz |
Set env so git global has $HOME
Currently setting git config fails because the env isn't complete.
Change-Id: I95cabe87b9ad99cafb62b1f3595122f8f9c34649
-rw-r--r-- | turbo_hipster/lib/models.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/turbo_hipster/lib/models.py b/turbo_hipster/lib/models.py index b1cbbd2..c64bf63 100644 --- a/turbo_hipster/lib/models.py +++ b/turbo_hipster/lib/models.py @@ -303,7 +303,9 @@ class ShellTask(Task): if not os.path.exists(local_path): os.makedirs(local_path) + env = os.environ git_args = copy.deepcopy(job_args) + env.update(git_args) cmd = os.path.join( os.path.join(os.path.dirname(os.path.abspath(__file__)), @@ -319,15 +321,15 @@ class ShellTask(Task): while return_code != 0: tries += 1 return_code = utils.execute_to_log(cmd, self.git_prep_log, - env=git_args, cwd=local_path) - if tries >= 2: + env=env, cwd=local_path) + if tries == 2: # Try upping the post buffer. See: # http://stackoverflow.com/questions/6842687/ # the-remote-end-hung-up-unexpectedly-while-git-cloning utils.execute_to_log( "git config --global http.postBuffer 1048576000", - self.git_prep_log, env=git_args, cwd=local_path) - if tries >= 3: + self.git_prep_log, env=env, cwd=local_path) + if tries >= 4: break if return_code != 0: cmd = 'ifconfig' |