piotrmurach / tty-command

Execute shell commands with pretty output logging and capture stdout, stderr and exit status.
https://ttytoolkit.org
MIT License
400 stars 34 forks source link

Redirection example in the README raises an error #32

Closed babelfish closed 6 years ago

babelfish commented 6 years ago
2.4.0 (main):0 > cmd = TTY::Command.new
#<TTY::Command:0x007fe751c0cca0 @output=#<IO:<STDOUT>>, @color=true, @uuid=true, @printer_name=:pretty, @dry_run=false, @printer=#<TTY::Command::Printers::Pretty:0x007fe751c0f2c0 @output=#<IO:<STDOUT>>, @options={:color=>true, :uuid=>true}, @enabled=true, @color=#<Pastel @styles=[]>>>
2.4.0 (main):0 > cmd.run('echo foo', stderr: :stdout)
[b0c321ca] Running echo foo
TypeError: no implicit conversion from nil to integer
from /Users/benjamin/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/tty-command-0.5.0/lib/tty/command/process_runner.rb:65:in `kill'
piotrmurach commented 6 years ago

Thanks for using the library and submitting this issue.

I've fixed redirections, added new docs and released v0.6.0. Enjoy!