Sha256: a2e9a6d2dbed215cbf06d3e17d739f3338ef97808b129229d1e48a7ba3946a5e
Contents?: true
Size: 714 Bytes
Versions: 32
Compression:
Stored size: 714 Bytes
Contents
require "fileutils" module Vagrant module LXC module Action class CompressRootFS def initialize(app, env) @app = app end def call(env) raise Vagrant::Errors::VMPowerOffToPackage if env[:machine].provider.state.id != :stopped env[:ui].info I18n.t("vagrant.actions.lxc.compressing_rootfs") @rootfs = env['package.rootfs'] = env[:machine].provider.driver.compress_rootfs @app.call env recover # called to remove the rootfs tarball end def recover(*) if @rootfs && File.exist?(@rootfs) FileUtils.rm_rf(File.dirname @rootfs) end end end end end end
Version data entries
32 entries across 32 versions & 2 rubygems