Skip to main content

is_interactive

Function is_interactive 

Source
pub fn is_interactive() -> bool
Expand description

Check whether the program is running in an interactive terminal suitable for progress bars and spinners.

Returns false when stdout is not a terminal (piped to a file or another process) or when TERM is set to dumb. This lets callers gracefully fall back to plain log output instead of using ANSI-spinner-based UI.