Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14449614
D10626.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10626.diff
View Options
diff --git a/src/applications/config/check/PhabricatorSetupCheckPygment.php b/src/applications/config/check/PhabricatorSetupCheckPygment.php
--- a/src/applications/config/check/PhabricatorSetupCheckPygment.php
+++ b/src/applications/config/check/PhabricatorSetupCheckPygment.php
@@ -7,8 +7,7 @@
$pygment = PhabricatorEnv::getEnvConfig('pygments.enabled');
if ($pygment) {
- list($err) = exec_manual('pygmentize -h');
- if ($err) {
+ if (!Filesystem::binaryExists('pygmentize')) {
$summary = pht(
'You enabled pygments but the pygmentize script is not '.
'actually available, your $PATH is probably broken.');
@@ -25,6 +24,28 @@
->setMessage($message)
->addRelatedPhabricatorConfig('pygments.enabled')
->addPhabricatorConfig('environment.append-paths');
+ } else {
+ list($err) = exec_manual('pygmentize -h');
+ if ($err) {
+ $summary = pht(
+ 'You have enabled pygments and the pygmentize script is '.
+ 'available, but does not seem to work.');
+
+ $message = pht(
+ 'Phabricator has %s available in $PATH, but the binary '.
+ 'exited with an error code when run as %s. Check that it is '.
+ 'installed correctly.',
+ phutil_tag('tt', array(), 'pygmentize'),
+ phutil_tag('tt', array(), 'pygmentize -h'));
+
+ $this
+ ->newIssue('pygments.failed')
+ ->setName(pht('pygmentize Not Working'))
+ ->setSummary($summary)
+ ->setMessage($message)
+ ->addRelatedPhabricatorConfig('pygments.enabled')
+ ->addPhabricatorConfig('environment.append-paths');
+ }
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 10:58 PM (7 h, 30 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6933506
Default Alt Text
D10626.diff (1 KB)
Attached To
Mode
D10626: Differentiate between "no pygmetnize" and "nonworking pygmentize" during setup
Attached
Detach File
Event Timeline
Log In to Comment