close
The Wayback Machine - https://web.archive.org/web/20201029194059/https://github.com/thoughtworks/talisman/issues/232
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows uninstallation is not removing hooks it created #232

Open
harinee opened this issue Aug 22, 2020 · 0 comments
Open

Windows uninstallation is not removing hooks it created #232

harinee opened this issue Aug 22, 2020 · 0 comments

Comments

@harinee
Copy link
Collaborator

@harinee harinee commented Aug 22, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.