Provide access to CWD and Env for passthru by making it a class
Summary:
Ref T3733. Currently, phutil_passthru() can't take Env or CWD parameters. In T3733, it would be cleanest to be able to provide a CWD. (A similar thing came up recently with Env, although we solved that in a different way.)
This just moves phutil_passthru() into a class so we can specify more stuff without some sort of hacky signature.
I added a trivial "this code doesn't have any syntax errors" sort of unit test; doing more is difficult (I think we'd have to execute a wrapper subprocess and have that subprocess do the actual passthru).
Test Plan: Ran unit tests; created this revision on the new code using arc, which hits phutil_passthru() to invoke EDITOR.
Reviewers: btrahan
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T3733
Differential Revision: https://secure.phabricator.com/D6774