Class: VagrantPlugins::HostShell::Provisioner
- Inherits:
-
Object
- Object
- VagrantPlugins::HostShell::Provisioner
- Defined in:
- lib/vagrant-host-shell/provisioner.rb
Instance Method Summary collapse
Instance Method Details
#provision ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/vagrant-host-shell/provisioner.rb', line 3 def provision result = Vagrant::Util::Subprocess.execute( 'bash', '-c', config.inline, :notify => [:stdout, :stderr], :workdir => config.cwd ) do |io_name, data| @machine.env.ui.info "[#{io_name}] #{data}" end if config.abort_on_nonzero && !result.exit_code.zero? raise VagrantPlugins::HostShell::Errors::NonZeroStatusError.new(config.inline, result.exit_code) end end |