Page MenuHomePhabricator

Explicitly pass PHABRICATOR_ENV and PHABRICATOR_INSTANCE to subprocesses
ClosedPublic

Authored by epriestley on Jan 5 2017, 10:33 PM.
Tags
None
Referenced Files
F18868815: D17148.id41239.diff
Tue, Nov 4, 8:41 AM
F18866773: D17148.diff
Mon, Nov 3, 7:17 PM
F18821693: D17148.id41237.diff
Thu, Oct 23, 1:17 AM
F18770833: D17148.id41237.diff
Wed, Oct 8, 3:23 PM
F18769122: D17148.id.diff
Wed, Oct 8, 6:34 AM
F18765240: D17148.diff
Tue, Oct 7, 10:23 AM
F18764290: D17148.id41239.diff
Tue, Oct 7, 5:19 AM
F18756163: D17148.id.diff
Sun, Oct 5, 9:42 AM
Subscribers
None

Details

Summary

Fixes T12070. Ref T12071. See T12071 for discussion.

D17100 changed things so that bin/repository gets an explicit TERM=dumb. As a side effect, this threw away the rest of the environment for installs with no "E" in variables_order. In particular, this means that "PHABRICATOR_ENV" may be dropped.

Since we're churning a lot and it's already Thursday, just patch this for now by reading "PHABRICATOR_ENV" out of the environment. I'll pursue more ambitious changes to fix this correctly after master promotes.

Test Plan
  • Patched Phabricator to log which PHABRICATOR_ENV it was reading to /tmp/env.log during startup.
  • Set variables_order to "GPCS" (no "E").
  • Ran PHABRICATOR_ENV=custom/porcupine ./bin/phd start.
    • Before patch: bin/repository subprocess lauched with no PHABRICATOR_ENV.
    • After patch: bin/repository subprocess gets PHABRICATOR_ENV correctly.

I also fiddled around with trying to fix this "right" without requiring config changes, but couldn't find or google anything that lets us rebuild $_ENV if variables_order is whack.

Diff Detail

Repository
rPHU libphutil
Branch
force_env
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 15121
Build 19855: Run Core Tests
Build 19854: arc lint + arc unit