Sha256: 205daa0b22959ee4fee4e3723350733e85d7cc00feab3eecd52dc798864fac90
Contents?: true
Size: 662 Bytes
Versions: 3
Compression:
Stored size: 662 Bytes
Contents
module Berkshelf::Vagrant module Action # @author Jamie Winsor <reset@riotgames.com> class Clean include Berkshelf::Vagrant::EnvHelpers def initialize(app, env) @app = app end def call(env) if env[:berkshelf].shelf && File.exist?(env[:berkshelf].shelf) env[:berkshelf].ui.info "Cleaning Vagrant's berkshelf" FileUtils.remove_dir(env[:berkshelf].shelf, force: true) FileUtils.rm_f(cache_file) env[:berkshelf].shelf = nil end @app.call(env) rescue Berkshelf::BerkshelfError => e raise VagrantWrapperError.new(e) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems