Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da4cc8a

Browse files
guilhemSean OMeara
authored and
Sean OMeara
committed
[COOK-3796] Fix virtualenv when user hasn't right on parent directory
Signed-off-by: Sean OMeara <[email protected]>
1 parent dde0fe9 commit da4cc8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

providers/virtualenv.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def whyrun_supported?
2828

2929
action :create do
3030
unless exists?
31+
directory new_resource.path do
32+
user new_resource.owner if new_resource.owner
33+
group new_resource.group if new_resource.group
34+
end
3135
Chef::Log.info("Creating virtualenv #{new_resource} at #{new_resource.path}")
3236
interpreter = new_resource.interpreter ? " --python=#{new_resource.interpreter}" : ""
3337
execute "#{virtualenv_cmd}#{interpreter} #{new_resource.options} #{new_resource.path}" do

0 commit comments

Comments
 (0)