From cf1ba31d7a454a129208cfde858e439bc02ea8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 22 Jan 2021 17:59:31 +0100 Subject: [PATCH] Hide rustc output by default. But add an environment variable to allow showing it, if wanted. Fixes #30 --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index de50135..dae25d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -249,6 +249,9 @@ impl AutoCfg { } command.arg("-").stdin(Stdio::piped()); + if env::var_os("AUTOCFG_SHOW_RUSTC_OUTPUT").is_none() { + command.stderr(Stdio::null()); + } let mut child = try!(command.spawn().map_err(error::from_io)); let mut stdin = child.stdin.take().expect("rustc stdin");