Open torstello opened 9 years ago
I also tried:
io_trash = File.open(File::NULL, 'w')
RYE_OPTS = {
:error => io_trash,
io_trash = File.open('/dev/null', 'w')
RYE_OPTS = {
:error => io_trash,
io = StringIO.new('dontbotherme')
RYE_OPTS = {
:error => io,
with all this, the error still ends up on STDERR.
The only thing that changed it was :error => STDOUT
i didn't want to close this issue :)
Hi Delano,
maybe you can direct me to a solution; i don't manage to suppress the printing to STDERR when a remote cmd fails (like
date --foobar
). (I'm collecting and further process the output of rye::set / rye::box commands)I tried last with this rye_opts:
but it always prints the cmd error to $stderr:
The only way that really works is redirect the stderr of my cli program like this
tmt host -h testserver date -- --foo 2>/dev/null
But of course that's not a solution.
Any hint is very much appreciated!