Sha256: ac3cc6b3965bd04f582449271cf423187df460c942968444c1db0396d4fa0ee0
Contents?: true
Size: 1.01 KB
Versions: 13
Compression:
Stored size: 1.01 KB
Contents
module VagrantPlugins module ProviderVirtualBox module Action class Customize def initialize(app, env) @app = app end def call(env) customizations = env[:machine].provider_config.customizations if !customizations.empty? env[:ui].info I18n.t("vagrant.actions.vm.customize.running") # Execute each customization command. customizations.each do |command| processed_command = command.collect do |arg| arg = env[:machine].id if arg == :id arg.to_s end result = env[:machine].provider.driver.execute_command(processed_command) if result.exit_code != 0 raise Vagrant::Errors::VMCustomizationFailed, { :command => processed_command.inspect, :error => result.stderr } end end end @app.call(env) end end end end end
Version data entries
13 entries across 13 versions & 5 rubygems