Sha256: 6f229fcd43dbd38f26d97b5d90e7bc6413da386e4ec39734695af7ecc4a36905
Contents?: true
Size: 822 Bytes
Versions: 75
Compression:
Stored size: 822 Bytes
Contents
require 'open3' require 'r10k/util/subprocess/runner' # 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::Runner::Windows < R10K::Util::Subprocess::Runner def initialize(argv) @argv = argv end def run spawn_opts = @cwd ? {:chdir => @cwd} : {} stdout, stderr, status = Open3.capture3(*@argv, spawn_opts) @result = R10K::Util::Subprocess::Result.new(@argv, stdout, stderr, status.exitstatus) rescue Errno::ENOENT, Errno::EACCES => e @result = R10K::Util::Subprocess::Result.new(@argv, '', e.message, 255) end end
Version data entries
75 entries across 75 versions & 2 rubygems