Re: Stop prepending /usr/bin to hooks PATH, or document it very clearly
- From
Andreas Krey <a.krey@gmx.de>
- Date
- Oct 18, 2014, 14:49 UTC
- Message-ID
- <20141018144924.GA17925@inner.h.apk.li>
- In-Reply-To
- <CAFXrp_c+dxafLOO6T=LDd6OxhfpamkJsUc8iBwB-B41z8Htc4A@mail.gmail.com>
On Fri, 17 Oct 2014 13:25:42 +0000, Ciro Santilli wrote: ...
Show 7 quoted lines
> The problem is that the `/usr/bin` breaks "interpreter version manager > systems" like RVM, rbenv, virtualenv, etc. since people will write > hooks like: > > #!/usr/bin/env ruby > > and the `/usr/bin` ruby will get run instead of the managed one
And that is the right thing to do. What ruby to execute with is a property of the hook script, not of the virtualenv a user happens to be in. If you want virtualenvs, you should set up the right one within the hook script.
...
> - documenting this behavior *very* clearly on `man githooks`
That would still be a good thing to do.
Andreas
-- "Totally trivial. Famous last words." From: Linus Torvalds <torvalds@*.org> Date: Fri, 22 Jan 2010 07:29:21 -0800