Skip to main content

has_output_redirection

Function has_output_redirection 

Source
pub fn has_output_redirection(command: &str) -> Option<Redirection>
Expand description

Check whether command contains output redirection that could mutate filesystem state.

Parses the command with tree-sitter-bash and inspects file_redirect nodes. See check_file_redirect for the full safe/flagged policy.