def run(*args, &block)
      cmd = command(*args)
      result = execute_command(cmd, &block)
      if result && result.failure?
        raise ExitError.new(cmd.to_command, result)
      end
      result
    end
def run(*args, &block)
      cmd = command(*args)
      result = execute_command(cmd, &block)
      if result && result.failure?
        raise ExitError.new(cmd.to_command, result)
      end
      result
    end
Initialize a Command object

 @param [Hash] options
 @option options [IO] :output
   the stream to which printer prints, defaults to stdout
 @option options [Symbol] :printer
   the printer to use for output logging, defaults to :pretty
 @option options [Symbol] :dry_run
   the mode for executing command

 @api public
 Start external executable in a child process

 @example
   cmd.run(command, [argv1, ..., argvN], [options])

 @example
   cmd.run(command, ...) do |result|
     ...
   end

 @param [String] command
   the command to run

 @param [Array[String]] argv
   an array of string arguments

 @param [Hash] options
   hash of operations to perform
 @option options [String] :chdir
   The current directory.
 @option options [Integer] :timeout
   Maximum number of seconds to allow the process
   to run before aborting with a TimeoutExceeded
   exception.
 @option options [Symbol] :signal
   Signal used on timeout, SIGKILL by default

 @yield [out, err]
   Yields stdout and stderr output whenever available

 @raise [ExitError]
   raised when command exits with non-zero code

 @api public