Method: Bosh::Agent::Message::Ssh#shell_cmd

Defined in:
lib/bosh_agent/message/ssh.rb

#shell_cmd(cmd) ⇒ Object



32
33
34
35
# File 'lib/bosh_agent/message/ssh.rb', line 32

def shell_cmd(cmd)
  shell_output = %x[#{cmd} 2>&1]
  raise "'#{cmd}' failed, error: #{shell_output}" if $?.exitstatus != 0
end