Class: VagrantPlugins::CapistranoPush::Push

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-capistrano-push/push.rb

Instance Method Summary collapse

Instance Method Details

#pushObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/vagrant-capistrano-push/push.rb', line 8

def push
  result = Vagrant::Util::Subprocess.execute(
    'bash',
    '-c',
    config.inline,
    :workdir => @env.root_path.to_s,
    :notify => [:stdout, :stderr]
  )

  if result.exit_code != 0
    raise Errors::CommandFailed,
      cmd: config.inline,
      workdir: @env.root_path.to_s,
      stdout: result.stdout,
      stderr: result.stderr
  end

  result
end