@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.

Fix Diffusion commands in non-English environments

Summary:
Closes T15966

Force Diffusion commands to be executed in the "LC_ALL=C" language mode, that is, English,
defusing whatever custom language you have in your LANGUAGE variable.

Related reading:

https://we.phorge.it/T15872

Test Plan:
Make sure Subversion is installed on your system. Explicitly set `LC_ALL`.
Finally, this unit test works, even if you have something esoteric in your LANGUAGE:

arc unit ./src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php

Before, it was crashing, like mentioned in T15966.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15966

Differential Revision: https://we.phorge.it/D25846

+4 -2
+4 -2
src/applications/diffusion/protocol/DiffusionCommandEngine.php
··· 175 175 $repository = $this->getRepository(); 176 176 177 177 $env = array(); 178 - // NOTE: Force the language to "en_US.UTF-8", which overrides locale 178 + // NOTE: Force the language to "C", which overrides locale 179 179 // settings. This makes stuff print in English instead of, e.g., French, 180 180 // so we can parse the output of some commands, error messages, etc. 181 - $env['LANG'] = 'en_US.UTF-8'; 181 + // Note that LANG can be ignored if there is LANGUAGE. 182 + // https://we.phorge.it/T15872 183 + $env['LC_ALL'] = 'C'; 182 184 183 185 // Propagate PHABRICATOR_ENV explicitly. For discussion, see T4155. 184 186 $env['PHABRICATOR_ENV'] = PhabricatorEnv::getSelectedEnvironmentName();