Browse files

COOK-2484: setting HOME env var to app shared directory when installi…

…ng requirements
  • Loading branch information...
1 parent 692c9d9 commit 5add1f4774da7cbc01b4316e4cd92703d6b5daf6 Cameron Johnston committed Feb 26, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 providers/django.rb
@@ -60,6 +60,9 @@
pip_cmd = ::File.join(new_resource.virtualenv, 'bin', 'pip')
execute "#{pip_cmd} install --source=#{Dir.tmpdir} -r #{new_resource.requirements}" do
cwd new_resource.release_path
+ # seems that if we don't set the HOME env var pip tries to log to /root/.pip, which fails due to permissions
+ # setting HOME also enables us to control pip behavior on per-project basis by dropping off a pip.conf file there
+ environment 'HOME' => ::File.join(new_resource.path,'shared')
user new_resource.owner

0 comments on commit 5add1f4

Please sign in to comment.