Skip to main content

recognizably_changes

Function recognizably_changes 

Source
pub fn recognizably_changes(command: &str) -> bool
Expand description

Whether command recognizably changes something: a redirection into a file, a delete, a remote write, a known file-changing program (cp, mkdir, chmod, tee, sed -i, …), or a package install. Behind a remote-exec wrapper the command it runs is judged. Unlike “not read-only”, an unknown program is not a recognized change, so a caller that credits work from this can only miss a change, never invent one. Read from token structure only (machine format: a shell command line).