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

Allow download of binary only without forcing a git hook #419

Open
FelixMarcus opened this issue Mar 4, 2023 · 1 comment
Open

Allow download of binary only without forcing a git hook #419

FelixMarcus opened this issue Mar 4, 2023 · 1 comment
Assignees

Comments

@FelixMarcus
Copy link

Problem

The install instructions as provided assume one of a couple of things that are not always true (at least for me):

  1. I'll want to install talisman globally and use it everywhere
  2. Point 1 is also true for the homebrew option
  3. If I want to install talisman within a repo only, I will automatically set it up with a hook in the way that the developers imagined

Typically I try to keep dependencies maintained within the repo - I want to minise the external setup steps my teams makes when configuring a workstation.

There are other commit hook options out there, and we don't want one individual tool forcing it's way into our specific hooks configuration - the developer should be configuring this to match their system and needs.

So, the options available are too specific for my typical use case.

Solution

Given that there isn't any package manager support available (#362) then it would be valuable to at least be able to download and manage talisman as a dependency within the scripting available in said package managers.

I would suggest that an option is provided on the ./install.sh script to skip any hook installation and just download the binary.

This would allow a developer to add an install script e.g. ./install-talisman.sh no-hook into their package manager (e.g. npm has postinstall) and then use lefthook as they would any other dev dependency - including running it in their git hooks the same way that they use any other linting or testing tool.

Documentation

The existing documentation is a little hard to follow without proper understanding of the code base, and this will make things more confusing. A benefit of requiring that the install script install a git hook is that there's automatically something in place - this option is designed to turn off that requirement, a potential downside.

We should signpost clearly that the option in question is a stripped down version that puts more responsibility in the hands of the developer, else someone thinks the tool is installed but has not actually ran it etc. I would also consider a strong warning when running the command on stdout to the same effect.

##Alternatives you've considered

Direct package management is raised in another ticket but has not been considered, and is more difficult to create and maintain. This solution gets universal coverage (with some work from the consumer).

@tw-owen-nelson
Copy link
Collaborator

Hello @FelixMarcus! Does #445 accomplish what you are looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants