From: Andreas Krey Date: Wed, 22 Apr 2015 15:31:09 GMT Subject: Re: git's directory is _prepended_ to PATH when called with an absolute path Message-ID: <20150422153109.GO23476@inner.h.apk.li> In-Reply-To: <553787A0.40707@gmail.com> On Wed, 22 Apr 2015 08:36:00 +0000, David Rodríguez wrote: ... > * User is relying on a custom path to select their Ruby version. For > example, let's say the first folder in path is "~/.rubies/2.2.2/bin". > * User runs "/usr/bin/git commit" and a pre-commit hook is triggered. > * The pre-commit hook starts with "#!/us/bin/env ruby" to select the > Ruby to be used in the hook, Yes...but shouldn't the hook itself know which ruby version it needs? After all, if I go into that directory with another ruby setup in my PATH, the hook should still work, and presumably that requires that the hook itself selects its version, and not the user's context. Andreas -- "Totally trivial. Famous last words." From: Linus Torvalds Date: Fri, 22 Jan 2010 07:29:21 -0800