Skip to content

Commit 3fc4180

Browse files
committed
Allow RUSTC_PROGRESS=0 to disable progress bars
1 parent 7a68011 commit 3fc4180

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_session/src/session.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,10 @@ pub fn build_session(
15111511
let asm_arch =
15121512
if target_cfg.allow_asm { InlineAsmArch::from_str(&target_cfg.arch).ok() } else { None };
15131513

1514-
let progress_bars = std::env::var_os("RUSTC_PROGRESS").map(|_| Session::init_progress_bars());
1514+
let progress_bars = match std::env::var_os("RUSTC_PROGRESS") {
1515+
Some(val) if val != "0" => Some(Session::init_progress_bars()),
1516+
_ => None,
1517+
};
15151518

15161519
let sess = Session {
15171520
target: target_cfg,

0 commit comments

Comments
 (0)