Subversion strips PATH for commit hooks, but we expect to be able to run svnlook (and maybe a few other commands) from within the hook. The "right" fix for this is to just add those paths to environment.append-paths (even though they may be redundant with PATH) but this is pretty obscure and we don't warn you about it or detect/hint about this issue.
Description
Description
Revisions and Commits
Revisions and Commits
Event Timeline
Comment Actions
I updated the documentation for this already, but we should add an explicit status check for it. Specifically, the issue is:
- When SVN runs commit hooks, it wipes out all of the environmental variables as it invokes the script.
- This includes PATH.
- The Phabricator commit hook needs to run svnlook from within the hook.
- If svnlook is available in PATH, but not in environment.append-paths, the hook will fail to find the binary. This is pretty subtle and confusing.
Instead, on this screen:
...near the checks for svn, svnserve, and svnadmin, we should:
- Test for svnlook, and raise an error if it's not found.
- Test that svnlook is a descendant of some path in environment.append-paths, and raise a more specific error if not. This error can just advise users to add the correct path to environment.append-paths.