Skip to main content

uninstall

Function uninstall 

Source
pub fn uninstall(remove_binary: bool) -> Result<(), String>
Expand description

Take the shims out of the repository we are standing in.

Deliberately narrow. It removes files that are OURS and nothing else:

  • a hook we did not write is left alone and named, because somebody wrote it on purpose;
  • hook.skip and amont.severity are never touched — those are the user’s statements about their own repository, not our artefacts, and a reinstall should not silently forget that they disabled a check;
  • the binary goes only when asked, because other repositories are using it.