@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Set `TERM` to prevent `No entry for terminal type "unknown"` messages during fetch

Summary:
Fetches cause output in `/var/tmp/phd/log/daemons.log` as
follows:
```
PHLOG: 'Unexpected output while updating repository "rREPONAME": No entry for terminal type "unknown";
using dumb terminal settings.
' at [/path/to/phabricator/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:455]
```

These warnings come from PHP itself. Silence these warnings by providing a
known value for `TERM` before shelling out to the PHP script.

See also D9744 (reverted in D11644) and T4990/T7119, which are a similar issue,
but in the pre-receive hooks, not the pull daemons.

Test Plan:
Enabled in production, observed errors to be silenced and
no SSH hangs

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D17100

+5
+5
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 272 272 273 273 $future->setTimeout($timeout); 274 274 275 + // The default TERM inherited by this process is "unknown", which causes PHP 276 + // to produce a warning upon startup. Override it to squash this output to 277 + // STDERR. 278 + $future->updateEnv('TERM', 'dumb'); 279 + 275 280 return $future; 276 281 } 277 282