HomePhabricator

Unsquelch errors when specifying bad environments to ExecFuture

Description

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

Details

Provenance
epriestleyAuthored on
epriestleyPushed on Jan 1 2015, 3:22 PM
Reviewer
btrahan
Differential Revision
D11092: Unsquelch errors when specifying bad environments to ExecFuture
Parents
rPHUf9ecfb447892: Default remarkup code blocks to plain text, not PHP
Branches
Unknown
Tags
Unknown