knife-tidy icon indicating copy to clipboard operation
knife-tidy copied to clipboard

backup path can be empty and clean can still proceed

Open haidangwa opened this issue 6 years ago • 0 comments

This assertion was made for a different issue: https://github.com/chef-customers/knife-tidy/issues/79#issuecomment-357061132

However, this assertion fails, because the code is only checking that the directory exists and is a directory. The directory can actually be empty and the destructive action can still proceed. From what I could find, these are the only two validation checks pertaining to the backup path: https://github.com/chef-customers/knife-tidy/blob/master/lib/chef/knife/tidy_server_clean.rb#L48-L56

haidangwa avatar Aug 01 '18 18:08 haidangwa