Skip to content

Commit 13ccfa6

Browse files
committed
fix(cli/self-update): enforce a newline after check_updates()
1 parent 657d68b commit 13ccfa6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cli/rustup_mode.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,13 @@ async fn check_updates(cfg: &Cfg<'_>, opts: CheckOpts) -> Result<ExitCode> {
915915
writeln!(t.lock(), "{message}")?;
916916
}
917917
}
918+
if has_progress_bars {
919+
// HACK: Add a final newline to avoid possible display issues with `indicatif` in
920+
// certain terminal emulators. Currently, `indicatif` puts a series of spaces at the end
921+
// of the line, forcing any output after the progress bar to be on a second line. This
922+
// might not be desirable in all cases.
923+
writeln!(t.lock())?;
924+
}
918925
}
919926

920927
let self_update_mode = SelfUpdateMode::from_cfg(cfg)?;

0 commit comments

Comments
 (0)