git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git's directory is _prepended_ to PATH when called with an absolute path

From
David Rodríguez <deivid.rodriguez@gmail.com>
Date
Apr 21, 2015, 21:37 UTC
Message-ID
<5536C319.4000402@gmail.com>
For example, if I run git using:
$ /usr/bin/git
then /usr/bin is prepended to the path. Is this intentional? If it is, why?

This causes issues with Ruby git hooks, because Ruby version managers rely on custom settings in PATH to select the Ruby executable, and there's usually a system Ruby living in /usr/bin. See https://github.com/github/hub/issues/855 for an example.

Thanks a lot,
David Rodríguez.
Next: Junio C Hamano
Message 1 of 9 in “git's directory is _prepended_ to PATH when called with an absolute path”
  1. David RodríguezApr 21, 2015
  2. Junio C HamanoApr 21, 2015
  3. David RodríguezApr 21, 2015
  4. David RodríguezApr 21, 2015
  5. Andreas KreyApr 22, 2015
  6. David RodríguezApr 22, 2015
  7. Andreas KreyApr 22, 2015
  8. brian m. carlsonApr 22, 2015
  9. David RodríguezApr 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.