Skip to content

Commit

Permalink
Clean up the AppData directory when removing the Windows app
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmantis committed Jul 25, 2016
1 parent 153ca52 commit 446bfaa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/resource_chef_dk_app_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ class ChefDkAppWindows < ChefDkApp
else
package('Chef Development Kit') { action :remove }
end
directory ::File.expand_path('~/AppData/Local/chefdk') do
recursive true
action :delete
end
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions spec/resources/chef_dk_app/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@
context c do
include_context description

it 'deletes the Chef-DK AppData directory' do
d = File.expand_path('~/AppData/Local/chefdk')
expect(chef_run).to delete_directory(d).with(recursive: true)
end

context 'app in the installed list' do
let(:listed?) { true }

Expand Down

0 comments on commit 446bfaa

Please sign in to comment.