hooks run with PATH missing /usr/local/bin/

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Low
    • None
    • Affects Version/s: 3.1.2
    • Component/s: General
    • None
    • Environment:

      Standard sourcetree installation on OSX High Sierra

    • Severity 3 - Minor

      git hooks are run in an environment without `/usr/local/bin/` on the `PATH`, even though this is always on the `PATH` on macOS, even in a very bare shell (cf `env -i bash --norc --noprofile`).

      ```

      /Applications/Sourcetree.app/Contents/Resources/git_local/libexec/git-core:/Applications/Sourcetree.app/Contents/Resources/bin:/Applications/Sourcetree.app/Contents/Resources/git_local/bin:/Applications/Sourcetree.app/Contents/Resources/git_local/gitflow:/Applications/Sourcetree.app/Contents/Resources/git_local/git-lfs:/usr/bin:/bin:/usr/sbin:/sbin
      ```

      This means that hooks in particular can't use `/usr/bin/env python3`, without having to add `/usr/local/bin/` to the `PATH` themselves.

        1. HPE2-K42-dumps.pdf
          390 kB
          Ellen Coleman
        2. 202-450-dumps.pdf
          994 kB
          Ellen Coleman
        3. 201-450-dumps.pdf
          337 kB
          Ellen Coleman

              Assignee:
              Unassigned
              Reporter:
              Scott Morrison
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: