Unsquelch errors when specifying bad environments to ExecFuture
Summary:
I accidentally passed a nonsense value to setEnv() on an ExecFuture (some non-string-like object).
This ended up trying to convert to a string inside proc_open(), but the @ and PhutilErrorTrap stopped it from ever getting printed or logged, so I had zero clue what was going on (daemon mysteriously exited with an error but no message).
Instead, make sure we string-cast all of env + cwd before we start trapping errors. They'll now throw first, and the exceptions will escape properly.
Test Plan:
- Mysterious silent crash turned into nice error message showing that I screwed up a variable when building the env.
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D11092