1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 18:28:47 +02:00
phorge-phorge/src/applications/config/check/PhabricatorSetupCheckPath.php

31 lines
1,023 B
PHP
Raw Normal View History

<?php
final class PhabricatorSetupCheckPath extends PhabricatorSetupCheck {
protected function executeChecks() {
// NOTE: We've already appended `environment.append-paths`, so we don't
// need to explicitly check for it.
$path = getenv('PATH');
if (!$path) {
$summary = pht(
'The environmental variable $PATH is empty. Phabricator will not '.
'be able to execute some commands.');
$message = pht(
'The environmental variable $PATH is empty. Phabricator needs to '.
'execute some system commands, like `svn`, `git`, `hg`, and `diff`. '.
'To execute these commands, the binaries must be available in the '.
'webserver\'s $PATH. You can set additional paths in Phabricator '.
'configuration.');
$this
->newIssue('config.environment.append-paths')
->setName(pht('$PATH Not Set'))
->setSummary($summary)
->setMessage($message)
->addPhabricatorConfig('environment.append-paths');
}
}
}