class ProcessExecuter::Runner
def spawn(command, options)
- Api: - private
Returns:
-
(ProcessExecuter::Result)
- The result of the completed subprocess
Raises:
-
(ProcessExecuter::Error)
- if the command could not be executed or failed
Parameters:
-
options
(ProcessExecuter::Options::RunOptions
) -- Options for running the command -
command
(Array
) -- The command to execute
def spawn(command, options) opened_pipes = wrap_stdout_stderr(options) ProcessExecuter.spawn_and_wait_with_options(command, options) ensure opened_pipes.each_value(&:close) opened_pipes.each { |option_key, pipe| raise_pipe_error(command, option_key, pipe) } end