diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-04-18 17:56:09 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-18 17:58:07 +0200 |
commit | 38726c5906a2add6511e211634d9966097a8a798 (patch) | |
tree | 972a103f755eda69a9a92a166cfe4197c7c22b05 /lib | |
parent | 542c7e7101068a3d424ee73b8284e722b2ecaa07 (diff) |
Always use stdout via output proxy
The switching between stdout and stderr on an automated basis caused
errors in the using code, where output was redirected but shouldn't.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/core/libimagrt/src/runtime.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs index 1c24e5af..c35af77c 100644 --- a/lib/core/libimagrt/src/runtime.rs +++ b/lib/core/libimagrt/src/runtime.rs @@ -52,8 +52,6 @@ pub struct Runtime<'a> { configuration: Option<Value>, cli_matches: ArgMatches<'a>, store: Store, - stdin_is_tty: bool, - stdout_is_tty: bool, } impl<'a> Runtime<'a> { @@ -144,8 +142,6 @@ impl<'a> Runtime<'a> { configuration: config, rtp: rtp, store: store, - stdout_is_tty: ::atty::is(::atty::Stream::Stdout), - stdin_is_tty: ::atty::is(::atty::Stream::Stdin), } }) .chain_err(|| RuntimeErrorKind::Instantiate) @@ -445,11 +441,7 @@ impl<'a> Runtime<'a> { } pub fn stdout(&self) -> OutputProxy { - if self.stdout_is_tty { - OutputProxy::Out(::std::io::stdout()) - } else { - OutputProxy::Err(::std::io::stderr()) - } + OutputProxy::Out(::std::io::stdout()) } pub fn stderr(&self) -> OutputProxy { |