Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't force the output of stderr #49

Open
wants to merge 2 commits into from

3 participants

@hlidotbe

Let the user handle stderr display if needed when executing commands. It allows for a cleaner output and a better control of what's displayed when building cli applications.

@hlidotbe hlidotbe Don't force the output of stderr
Let the user handle stderr display if needed when executing commands
ae22b5c
@delano
Owner

The issue here is that some commands (some implementations of ls for example) only print to STDERR and not STDOUT. The idea is that you're seeing everything as you would see it if you were actually logged into the remote machine.

@lemmycaution

+1

@hlidotbe I tried to install your fork with gem 'rye', git: 'https://github.com/epicagency/rye.git' but bundler gives error below, any idea?

rrno::ENOENT: No such file or directory - /etc/certs/gem-private_key.pem
An error occurred while installing rye (0.9.11), and Bundler cannot continue.

Cheers

@hlidotbe

@lemmycaution I've updated our fork (which updated this pull request, I'm a noob regarding those kind of stuff) so you should be able to install it from git.

@hlidotbe

@delano I only comme across your reply, sorry.

If you don't show stdout you're NOT seeing everything as you would see logged in. stderr is not a special case in this regard but just another output channel. If both stdout and stderr where outputted regardless of what someone does with it I'd agree that it would be "as logged in".

@lemmycaution

@hlidotbe cool, thanks for that. Honestly I preferred to monkey-patch it for using ruby logger instead of stdout/stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 17, 2014
  1. @hlidotbe

    Don't force the output of stderr

    hlidotbe authored
    Let the user handle stderr display if needed when executing commands
Commits on Feb 28, 2014
  1. @hlidotbe

    Don't sign gem

    hlidotbe authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +1 −1  lib/rye/box.rb
  2. +3 −3 rye.gemspec
View
2  lib/rye/box.rb
@@ -1097,7 +1097,7 @@ def create_channel()
end
channel.on_process {
channel[:handler] = :on_process
- STDERR.print channel[:stderr].read if channel[:stderr].available > 0
+ #STDERR.print channel[:stderr].read if channel[:stderr].available > 0
begin
send("state_#{channel[:state]}", channel) unless channel[:state].nil?
rescue Interrupt
View
6 rye.gemspec
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Delano Mandelbaum"]
- s.cert_chain = ["gem-public_cert.pem"]
+ #s.cert_chain = ["gem-public_cert.pem"]
s.date = "2013-11-11"
s.license = 'MIT'
s.description = "Run SSH commands on a bunch of machines at the same time (from Ruby)."
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
"Rakefile",
"Rudyfile",
"VERSION",
- "gem-public_cert.pem",
+ #"gem-public_cert.pem",
"lib/esc.rb",
"lib/rye.rb",
"lib/rye/box.rb",
@@ -69,7 +69,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
s.rubyforge_project = "rye"
s.rubygems_version = "1.8.23"
- s.signing_key = "/etc/certs/gem-private_key.pem"
+ #s.signing_key = "/etc/certs/gem-private_key.pem"
s.summary = "Run SSH commands on a bunch of machines at the same time (from Ruby)."
if s.respond_to? :specification_version then
Something went wrong with that request. Please try again.