diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/chef_fs/file_system.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/file_system.rb b/lib/chef/chef_fs/file_system.rb index 9fe726744e..ffbe274864 100644 --- a/lib/chef/chef_fs/file_system.rb +++ b/lib/chef/chef_fs/file_system.rb @@ -285,8 +285,12 @@ class Chef if options[:dry_run] ui.output "Would delete #{dest_path}" if ui else - dest_entry.delete(true) - ui.output "Deleted extra entry #{dest_path} (purge is on)" if ui + begin + dest_entry.delete(true) + ui.output "Deleted extra entry #{dest_path} (purge is on)" if ui + rescue Chef::ChefFS::FileSystem::NotFoundError + ui.output "Entry #{dest_path} does not exist. Nothing to do. (purge is on)" if ui + end end else ui.output ("Not deleting extra entry #{dest_path} (purge is off)") if ui |