Sha256: 36713f3e4e0467a81d226bce7535abd7a18e6b1f6bde798d5c47ee3bd47ad118
Contents?: true
Size: 804 Bytes
Versions: 17
Compression:
Stored size: 804 Bytes
Contents
# frozen_string_literal: true if Lolcommits::Platform.platform_windows? module Mercurial class Command private # need to use popen3 on windows - popen4 always eventually calls fork def execution_proc proc do debug(command) result = '' error = '' status = nil Open3.popen3(command) do |_stdin, stdout, stderr, wait_thread| Timeout.timeout(timeout) do while (tmp = stdout.read(102_400)) result += tmp end end while (tmp = stderr.read(1024)) error += tmp end status = wait_thread.value end raise_error_if_needed(status, error) result end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems