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)
Sun, Dec 15, 12:44 PM
Unknown Object (File)
Sat, Dec 7, 1:15 AM
Unknown Object (File)
Fri, Dec 6, 11:22 AM
Unknown Object (File)
Fri, Dec 6, 6:19 AM
Unknown Object (File)
Fri, Nov 29, 11:41 AM
Unknown Object (File)
Nov 26 2024, 5:50 AM
Unknown Object (File)
Nov 26 2024, 5:49 AM
Unknown Object (File)
Nov 19 2024, 12:18 PM
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.