mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-11 17:32:41 +01:00
81389e79e7
Summary: Use correct spelling of 'environment.append-paths' so that the current value of the variable will display as expected in the 'pygmentize Not Found' setup issue screen. Test Plan: * Enabled Pygments but haven't installed it * Follow 'unresolved setup issues' link to 'Not Found' screen * See that 'envinronment.append-paths' is None * Set 'environment.append-paths' * See that 'envinronment.append-paths' is still None * Apply this fix * See that 'environment.append-paths' is now '/usr/bin' Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5555
31 lines
959 B
PHP
31 lines
959 B
PHP
<?php
|
|
|
|
final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck {
|
|
|
|
protected function executeChecks() {
|
|
|
|
$pygment = PhabricatorEnv::getEnvConfig('pygments.enabled');
|
|
|
|
if ($pygment) {
|
|
list($err) = exec_manual('pygmentize -h');
|
|
if ($err) {
|
|
$summary = pht(
|
|
'You enabled pygments but the pygmentize script is not '.
|
|
'actually available, your $PATH is probably broken.');
|
|
|
|
$message = pht(
|
|
'The environmental variable $PATH does not contain '.
|
|
'pygmentize. You have enabled pygments, which requires '.
|
|
'pygmentize to be available in your $PATH variable.');
|
|
|
|
$this
|
|
->newIssue('pygments.enabled')
|
|
->setName(pht('pygmentize Not Found'))
|
|
->setSummary($summary)
|
|
->setMessage($message)
|
|
->addPhabricatorConfig('pygments.enabled')
|
|
->addPhabricatorConfig('environment.append-paths');
|
|
}
|
|
}
|
|
}
|
|
}
|