1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
phorge-phorge/src
epriestley e591ef4db9 Add setup checks for the availability of 'which' and 'diff' binaries
Summary:
Spent an hour or two helping a user figure this out. Make sure I never do that again.

If the webserver is configured with an empty or bogus PATH, binaries like 'which' and 'diff' (and 'git', and 'svn', etc.) may not be available. In most cases, this is fine, because we get an error like "sh: whatever-command not found", which is obvious to diagnose.

In the case of 'diff', we don't get this, because 'diff' is expected to exit with a nonzero code for differing files -- so we interpret the "sh: whatever-command not found" as "files differ" and then try to parse the empty output.

Explicitly check for 'which' (on Windows, 'where') and 'diff' during setup (I plan to refine the behavior around 'git', 'svn' and 'hg' at some point, but this is less pressing since the errors are trivial to support).

Test Plan: Faked failures on all modes, verified setup warnings look reasonable.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6008
2013-05-23 14:42:07 -07:00
..
aphront Route internal conduit calls if other hosts available 2013-05-19 04:16:10 -07:00
applications Add setup checks for the availability of 'which' and 'diff' binaries 2013-05-23 14:42:07 -07:00
docs Document [name](href) style links 2013-05-08 18:12:28 -07:00
infrastructure Stop writing empty strings to the ownerPHID column 2013-05-23 09:22:18 -07:00
view Add a basic multipage form 2013-05-23 14:39:01 -07:00
__celerity_resource_map__.php Add a basic multipage form 2013-05-23 14:39:01 -07:00
__phutil_library_init__.php Delete license headers from files 2012-11-05 11:16:51 -08:00
__phutil_library_map__.php Add setup checks for the availability of 'which' and 'diff' binaries 2013-05-23 14:42:07 -07:00