Homec4science

Provide access to CWD and Env for passthru by making it a class

Authored by epriestley <git@epriestley.com> on Aug 20 2013, 22:57.

Description

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

Details

Committed
epriestley <git@epriestley.com>Aug 20 2013, 22:57
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUeef230eaccc6: Plug memory leak with PhutilErrorTrap
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUe7fe186313fe: Provide access to CWD and Env for passthru by making it a class (authored by epriestley <git@epriestley.com>).Aug 20 2013, 22:57