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

Differentiate between "no pygmetnize" and "nonworking pygmentize" during setup

Summary: Fixes T6210. The current messaging may be confusing if `pygmentize` is available but broken.

Test Plan: Faked the binary names and hit the errors, which seemed helpful.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T6210

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

+23 -2
+23 -2
src/applications/config/check/PhabricatorSetupCheckPygment.php
··· 7 7 $pygment = PhabricatorEnv::getEnvConfig('pygments.enabled'); 8 8 9 9 if ($pygment) { 10 - list($err) = exec_manual('pygmentize -h'); 11 - if ($err) { 10 + if (!Filesystem::binaryExists('pygmentize')) { 12 11 $summary = pht( 13 12 'You enabled pygments but the pygmentize script is not '. 14 13 'actually available, your $PATH is probably broken.'); ··· 25 24 ->setMessage($message) 26 25 ->addRelatedPhabricatorConfig('pygments.enabled') 27 26 ->addPhabricatorConfig('environment.append-paths'); 27 + } else { 28 + list($err) = exec_manual('pygmentize -h'); 29 + if ($err) { 30 + $summary = pht( 31 + 'You have enabled pygments and the pygmentize script is '. 32 + 'available, but does not seem to work.'); 33 + 34 + $message = pht( 35 + 'Phabricator has %s available in $PATH, but the binary '. 36 + 'exited with an error code when run as %s. Check that it is '. 37 + 'installed correctly.', 38 + phutil_tag('tt', array(), 'pygmentize'), 39 + phutil_tag('tt', array(), 'pygmentize -h')); 40 + 41 + $this 42 + ->newIssue('pygments.failed') 43 + ->setName(pht('pygmentize Not Working')) 44 + ->setSummary($summary) 45 + ->setMessage($message) 46 + ->addRelatedPhabricatorConfig('pygments.enabled') 47 + ->addPhabricatorConfig('environment.append-paths'); 48 + } 28 49 } 29 50 } 30 51 }