lib/rake/funnel/support/msdeploy/registry_patch.rb in rake-funnel-0.12.0.pre vs lib/rake/funnel/support/msdeploy/registry_patch.rb in rake-funnel-0.13.0.pre

- old
+ new

@@ -57,23 +57,27 @@ Rake::Funnel::Support::Patch.new(self) do |p| resets = [] p.setup do - resets = KEYS.map do |key| - root.create(key) do |r| - begin - r[VERSION_VALUE] + begin + resets = KEYS.map do |key| + root.create(key) do |r| + begin + r[VERSION_VALUE] - delete_version = proc {} - rescue ::Win32::Registry::Error - r[VERSION_VALUE] = FAKE_VERSION + delete_version = proc {} + rescue ::Win32::Registry::Error + r[VERSION_VALUE] = FAKE_VERSION - delete_version = delete_value(r, VERSION_VALUE) - end + delete_version = delete_value(r, VERSION_VALUE) + end - delete_key(r) || delete_version + delete_key(r) || delete_version + end end + rescue ::Win32::Registry::Error => e + warn "Could not patch registry to pretend MSDeploy is installed: #{e}" end end p.reset do resets.compact.each do |reset|