Permalink
Browse files

Flipped back to using rsync because FileUtils::cp_r exit'ed when enco…

…ubtering a bad symbolic link
  • Loading branch information...
1 parent 7b78229 commit 6dceebeb787f134f7dd6e6d472122d00f325fb43 @cunnie cunnie committed Feb 23, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 providers/package.rb
@@ -65,10 +65,11 @@ def load_current_resource
case new_resource.type
when "app"
- ruby_block "Copy /Volumes/#{volumes_dir}/#{new_resource.app}.app to #{new_resource.destination}" do
- block do
- FileUtils.cp_r("/Volumes/#{volumes_dir}/#{new_resource.app}.app", new_resource.destination, :preserve => true, :remove_destination => true)
- end
+ # use "rsync -aH" instead of "cp -r" because rsync
+ # won't exit(1) when it hits a bad symbolic link (e.g. Dropbox's site.py, Skype's Growl).
+ execute "rsync -aH '/Volumes/#{volumes_dir}/#{new_resource.app}.app' '#{new_resource.destination}'" do
+ user WS_USER
+ group "admin"
end
file "#{new_resource.destination}/#{new_resource.app}.app/Contents/MacOS/#{new_resource.app}" do
mode 0755

0 comments on commit 6dceebe

Please sign in to comment.