Page MenuHomePhabricator

Unsquelch errors when specifying bad environments to ExecFuture
ClosedPublic

Authored by epriestley on Dec 30 2014, 7:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 12:18 PM
Unknown Object (File)
Sat, Nov 9, 2:44 AM
Unknown Object (File)
Sat, Nov 9, 2:44 AM
Unknown Object (File)
Fri, Nov 8, 9:47 PM
Unknown Object (File)
Tue, Oct 29, 7:48 PM
Unknown Object (File)
Oct 24 2024, 9:23 AM
Unknown Object (File)
Oct 20 2024, 1:52 PM
Unknown Object (File)
Oct 18 2024, 6:44 AM
Subscribers

Details

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.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Unsquelch errors when specifying bad environments to ExecFuture.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Dec 30 2014, 8:06 PM
This revision was automatically updated to reflect the committed changes.