# File lib/specinfra/backend/exec.rb, line 9 def run_command(cmd, opts={}) cmd = build_command(cmd) cmd = add_pre_command(cmd) stdout, stderr, exit_status = with_env do spawn_command(cmd) end if @example @example.metadata[:command] = cmd @example.metadata[:stdout] = stdout end CommandResult.new :stdout => stdout, :stderr => stderr, :exit_status => exit_status end