Sha256: 510ed0c734998e3013262f0484510f131b64360f27ac726ceffdd9009c3c110e
Contents?: true
Size: 790 Bytes
Versions: 14
Compression:
Stored size: 790 Bytes
Contents
require 'open3' # Run processes on Windows. # # This implementation relies on Open3.capture3 to run commands and capture # results. In contrast to the POSIX runner this cannot be used in an # asynchronous manner as-is; implementing that will probably mean launching a # thread and invoking #capture3 in that thread. class R10K::Util::Subprocess::Windows::Runner < R10K::Util::Subprocess::Runner def initialize(argv) @argv = argv @io = R10K::Util::Subprocess::Windows::IO.new end def run cmd = @argv.join(' ') stdout, stderr, status = Open3.capture3(cmd) @status = status @result = R10K::Util::Subprocess::Result.new(@argv, stdout, stderr, status.exitstatus) end def exit_code @status.exitstatus end def crashed? exit_code != 0 end end
Version data entries
14 entries across 14 versions & 1 rubygems