Sha256: 42842cd37725e8e160f95d2232478af0e9e6428a3b900c22a74092a2c5e00a29
Contents?: true
Size: 734 Bytes
Versions: 8
Compression:
Stored size: 734 Bytes
Contents
module Berkshelf module Vagrant module Action # @author Jamie Winsor <jamie@vialstudios.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)) env[:berkshelf].shelf = nil end @app.call(env) rescue Berkshelf::BerkshelfError => e raise Berkshelf::VagrantWrapperError.new(e) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems