This commit separates the scratch and output directory creation from the main package middleware into its own PackageSetupFolders middleware. Additionally, the validation that ensures an output file does not exist is moved into a validation function that can be shared across multiple methods. This refactor permits a pre-flight check to ensure box packaging would be successful before actually stopping the VM. Fixes GH-7351
18 lines
433 B
Ruby
18 lines
433 B
Ruby
require "log4r"
|
|
|
|
require_relative "package_setup_files"
|
|
|
|
module VagrantPlugins
|
|
module ProviderVirtualBox
|
|
module Action
|
|
class SetupPackageFiles < PackageSetupFiles
|
|
def initialize(*)
|
|
@logger = Log4r::Logger.new("vagrant::plugins::virtualbox::setup_package_files")
|
|
@logger.warn { "SetupPackageFiles has been renamed to PackageSetupFiles" }
|
|
super
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|