Skip to main content

detect_exec_misuse

Function detect_exec_misuse 

Source
pub fn detect_exec_misuse(
    argv: &[String],
    had_separator: bool,
) -> ExecMisuseReport
Expand description

Detect quoted single-command misuse. Pure.

Misuse is exactly: no -- separator was given and the argv after exec is a single element that contains whitespace (i.e. a whole command line was passed as one quoted string). A single bare executable name, a properly ---separated command, or multiple argv tokens are all legitimate.