Class: VagrantPlugins::ShellLocal::Provisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-shell-local/provisioner.rb

Instance Method Summary collapse

Instance Method Details

#provisionObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/vagrant-shell-local/provisioner.rb', line 5

def provision
  result = Vagrant::Util::Subprocess.execute(
    *config.command,
    :notify => [:stdout, :stderr],        
    :env => {PATH: ENV["VAGRANT_OLD_ENV_PATH"]},
  ) do |io_name, data|
    @machine.env.ui.info "[#{io_name}] #{data}"
  end

  if !result.exit_code.zero?      
    raise VagrantPlugins::ShellLocal::Errors::NonZeroStatusError.new(config.command, result.exit_code)  
  end
end