Class: NodeSpec::BackendProxy::Exec
- Includes:
- UnixshellUtility
- Defined in:
- lib/nodespec/backend_proxy/exec.rb
Constant Summary
Constants included from UnixshellUtility
UnixshellUtility::SUDO_PREFIX, UnixshellUtility::TEMP_DIR
Instance Method Summary collapse
Methods included from UnixshellUtility
#cmd_create_directory, #cmd_create_file, #run_as_sudo, #temp_directory
Methods included from CommandExecution
Methods included from VerboseOutput
Instance Method Details
#execute(command) ⇒ Object
11 12 13 14 15 16 17 18 |
# 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 |