Sha256: ba07fc8a8194f7cef4c89707dee65201ca4206666669915fc5c4084388cd2a1e
Contents?: true
Size: 472 Bytes
Versions: 1
Compression:
Stored size: 472 Bytes
Contents
#!/usr/bin/env ruby require 'pty' require 'readline' bin = "#{Gem.bin_path('voltos', 'voltos')}-cli" status = PTY.spawn(bin, *ARGV) do |stdout, stdin, pid| Thread.new do loop { STDOUT.print stdout.getc } end Thread.new do loop do input = Readline.readline("", true).strip stdin.puts input end end begin Process::waitpid(pid) rescue nil rescue SystemExit, Interrupt Process.kill('INT', pid) retry end end exit(status.to_i)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
voltos-0.3.0.rc7 | exe/voltos |