mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 22:22:44 +00:00
Accept verbosity in rustdoc.
This commit is contained in:
parent
ee8b5783af
commit
27b4f225ea
@ -27,6 +27,13 @@ fn main() {
|
|||||||
let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
|
let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set");
|
||||||
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
|
let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set");
|
||||||
|
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
let verbose = match env::var("RUSTC_VERBOSE") {
|
||||||
|
Ok(s) => usize::from_str(&s).expect("RUSTC_VERBOSE should be an integer"),
|
||||||
|
Err(_) => 0,
|
||||||
|
};
|
||||||
|
|
||||||
let mut dylib_path = bootstrap::util::dylib_path();
|
let mut dylib_path = bootstrap::util::dylib_path();
|
||||||
dylib_path.insert(0, PathBuf::from(libdir));
|
dylib_path.insert(0, PathBuf::from(libdir));
|
||||||
|
|
||||||
@ -63,6 +70,10 @@ fn main() {
|
|||||||
cmd.arg("--deny-render-differences");
|
cmd.arg("--deny-render-differences");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if verbose > 1 {
|
||||||
|
eprintln!("rustdoc command: {:?}", cmd);
|
||||||
|
}
|
||||||
|
|
||||||
std::process::exit(match cmd.status() {
|
std::process::exit(match cmd.status() {
|
||||||
Ok(s) => s.code().unwrap_or(1),
|
Ok(s) => s.code().unwrap_or(1),
|
||||||
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
|
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
|
||||||
|
Loading…
Reference in New Issue
Block a user