Skip to main content

progress_output_kind

Function progress_output_kind 

Source
pub(crate) fn progress_output_kind(
    mode: ProgressMode,
    stderr_is_tty: bool,
    term_supports_progress_bar: bool,
) -> ProgressOutputKind
Expand description

Selects the progress output style for mode given whether stderr is a TTY and whether the terminal environment is suitable for progress-bar control sequences.

The interactive indicatif stderr target hides itself when redirected or when the terminal is not user-attended, so forced progress falls back to LogProgress instead of a hidden bar in those cases.