Skip to main content

warn_external_hooks

Function warn_external_hooks 

Source
pub fn warn_external_hooks(
    snapshot: Option<&ConfigSnapshot>,
    stream: &mut impl Write,
)
Expand description

What: Write the warning, when there is one, to stream. Why: The command’s exit status already carries its result, so a stream that refuses the line is logged and the command goes on.

In TS you’d write (pseudocode):

const line = externalHooksWarning(snapshot); if (line !== undefined) stream.write(line);