Customer report: SourceTree 1.9.9.20 breaks PATH environment variable

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: High
    • 1.9.10.0
    • Affects Version/s: 1.9.9.20
    • Component/s: None
    • Severity 2 - Major

      I recently updated SourceTree to version 1.9.9.20, and it seems to no longer be using the PATH environment variable correctly. In particular, my commit-msg git hook is failing with the following message:

      `/usr/bin/env: 'python': No such file or directory`

      If I modify the script to run as a bash script, and have it `echo $PATH`, I get the following:

      `/mingw64/libexec/git-core:/mingw64/bin:/usr/bin:/c/Users/n0030352/bin:/c/Users/n0030352/AppData/Local/Atlassian/SourceTree/gitflow_local/gitflow:/bin:/mingw32/bin:/mingw64/bin:/c/Program Files (x86)/Atlassian/SourceTree/tools:/c/Users/n0030352/AppData/Local/Atlassian/SourceTree/git_extras`

      I get this error using both embedded and system git.

      However, if I use the git terminal out of SourceTree, I get the correct PATH variable output, none of which contains SourceTree. I can also commit just fine.

      So my guess is that the PATH variable output by SourceTree contains application-specific modification to the PATH variable, which fails to include the rest of the paths. For now I am just going to use 1.9.6.2 (https://downloads.atlassian.com/software/sourcetree/windows/SourceTreeSetup_1.9.6.2.exe).

       

      Potential workaround:

      You may need to make node available in a location which is already on the default system path, like `/usr/local/bin`, or you need to add a custom entry to $PATH in a way that can been seen by Mac Apps, not just your terminal. Here's how to do so: http://stackoverflow.com/a/26586170
      
      
      

       

            Assignee:
            Unassigned
            Reporter:
            Gideon Koh (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: