class NodeSpec::BackendProxy::Exec

Public Instance Methods

execute(command) click to toggle source
# File lib/nodespec/backend_proxy/exec.rb, line 11
def execute command
  command = run_as_sudo(command) if NodeSpec::RunOptions.run_local_with_sudo?
  execute_within_timeout(command) do
    output, status = Open3.capture2e(command)
    verbose_puts(output)
    status.success?
  end
end