Skip to main content

should_refuse_noninteractive

Function should_refuse_noninteractive 

Source
pub fn should_refuse_noninteractive(is_tty: bool, assume_yes: bool) -> bool
Expand description

Fail-closed policy: refuse a destructive/untrusted action when there is no interactive terminal to confirm at and the explicit opt-in was not passed. Also defeats yes | mermaid …, since a pipe is not a TTY.