class VagrantPlugins::CORL::Action::DeleteCache

Public Instance Methods

call(env) click to toggle source
Calls superclass method VagrantPlugins::CORL::BaseAction#call
   # File lib/core/vagrant/actions/delete_cache.rb
 7 def call(env)
 8   super do
 9     @app.call env
10     
11     env[:ui].info I18n.t("corl.vagrant.actions.delete_cache.start")
12     
13     # Check for saved image
14     box     = node.cache_setting(:box)
15     box_url = node.cache_setting(:box_url)
16     
17     # Clear cache unless saved image
18     node.clear_cache unless box && box_url
19   end
20 end