talisman icon indicating copy to clipboard operation
talisman copied to clipboard

Windows uninstallation is not removing hooks it created

Open harinee opened this issue 5 years ago • 0 comments
trafficstars

Describe the bug Every time we uninstall Talisman, if there are hooks created only by Talisman, Talisman cleans them up. But in Windows, all the hooks linger around and the cleaning needs to be manual. If this is missed in the manual step, the next installation of Talisman does not update the hook script

To Reproduce Steps to reproduce the behavior:

  1. Ensure there are repos with no pre-commit hooks.
  2. Install Talisman as pre-commit hook. Check there is a hook created in .git/hooks/pre-commit
  3. Uninstall Talisman. Notice the hook in .git/hooks/pre-commit is not removed
  4. Install Talisman again. Notice the hooks are not updated because the previous hooks were not cleaned

Expected behavior Hooks, if created only by Talisman, should be removed during uninstallation. Also check this works fine for upgrading versions

Desktop (please complete the following information):

  • OS: Windows 10

Additional context The current workaround is to manually remove the hooks every time you want to re-install Talisman So, incase you want to re-install,

  1. Uninstall Talisman https://github.com/thoughtworks/talisman#uninstallation-from-a-global-hook-template
  2. Remove pre-commit hook (or pre-push, as you have set Talisman up) from each repo
cd <repo>
rm -rf .git/pre-commit 
  1. Install Talisman https://github.com/thoughtworks/talisman#installation-as-a-global-hook-template

harinee avatar Aug 22 '20 05:08 harinee