cashapp / hermit

🐚 Hermit manages isolated, self-bootstrapping sets of tools in software projects.
https://cashapp.github.io/hermit
Apache License 2.0
587 stars 51 forks source link

Feature Request: Install Binaries Globally #260

Open MatthewDolan opened 2 years ago

MatthewDolan commented 2 years ago

I have been using hermit to install packages into local repos to great effect!

There are a few places where it would be really nice to be able to install those same binaries globally (e.g. into ~/bin so that if an individual repo does not have a binary pinned, it would fall back to this global binary).

The exact use case I am looking at is that I want to add a conventional commit message linter to a git hook in my dotfiles (which are shared between Mac and Linux instances) and it would be nice to programmatically define which linter version should be downloaded and used. Hermit already knows how to download and install the linter for both architectures, so it would be really nice to leverage that.

alecthomas commented 2 years ago

This can (somewhat) be done manually, by hermit init ~/.global-hermit; export PATH=$HOME/.global-hermit:$PATH.

For this specific example though, why not add it to the repo at the exact version?