Sha256: 0d535465cc3004c0225833ef8b50bbd63e987487ba9b724819021a1121918f7b
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
# Source: Mix of https://github.com/fastlane/fastlane/pull/7202/files, # https://github.com/fastlane/fastlane/pull/11384#issuecomment-356084518 and # https://github.com/DragonBox/u3d/blob/59e471ad78ac00cb629f479dbe386c5ad2dc5075/lib/u3d_core/command_runner.rb#L88-L96 module FastlaneCore class FastlanePty def self.spawn(*command, &block) require 'pty' PTY.spawn(command) do |stdout, stdin, pid| block.call(stdin, stdout, pid) end rescue LoadError require 'open3' Open3.popen2e(command) do |r, w, p| yield(w, r, p.value.pid) # note the inversion r.close w.close p.value.exitstatus end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fastlane-2.79.0.beta.20180125010002 | fastlane_core/lib/fastlane_core/fastlane_pty.rb |