diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index e83006d867..706581d849 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1219,6 +1219,7 @@ phutil_register_library_map(array( 'PhabricatorSetupCheckInvalidConfig' => 'applications/config/check/PhabricatorSetupCheckInvalidConfig.php', 'PhabricatorSetupCheckMail' => 'applications/config/check/PhabricatorSetupCheckMail.php', 'PhabricatorSetupCheckMySQL' => 'applications/config/check/PhabricatorSetupCheckMySQL.php', + 'PhabricatorSetupCheckPath' => 'applications/config/check/PhabricatorSetupCheckPath.php', 'PhabricatorSetupCheckStorage' => 'applications/config/check/PhabricatorSetupCheckStorage.php', 'PhabricatorSetupCheckTimezone' => 'applications/config/check/PhabricatorSetupCheckTimezone.php', 'PhabricatorSetupIssue' => 'applications/config/issue/PhabricatorSetupIssue.php', @@ -2581,6 +2582,7 @@ phutil_register_library_map(array( 'PhabricatorSetupCheckInvalidConfig' => 'PhabricatorSetupCheck', 'PhabricatorSetupCheckMail' => 'PhabricatorSetupCheck', 'PhabricatorSetupCheckMySQL' => 'PhabricatorSetupCheck', + 'PhabricatorSetupCheckPath' => 'PhabricatorSetupCheck', 'PhabricatorSetupCheckStorage' => 'PhabricatorSetupCheck', 'PhabricatorSetupCheckTimezone' => 'PhabricatorSetupCheck', 'PhabricatorSetupIssueView' => 'AphrontView', diff --git a/src/applications/config/check/PhabricatorSetupCheckPath.php b/src/applications/config/check/PhabricatorSetupCheckPath.php new file mode 100644 index 0000000000..253872ae73 --- /dev/null +++ b/src/applications/config/check/PhabricatorSetupCheckPath.php @@ -0,0 +1,30 @@ +newIssue('config.environment.append-paths') + ->setName(pht('$PATH Not Set')) + ->setSummary($summary) + ->setMessage($message) + ->addPhabricatorConfig('environment.append-paths'); + } + } +} diff --git a/src/infrastructure/PhabricatorSetup.php b/src/infrastructure/PhabricatorSetup.php index 899243abed..3797d23bad 100644 --- a/src/infrastructure/PhabricatorSetup.php +++ b/src/infrastructure/PhabricatorSetup.php @@ -107,26 +107,6 @@ final class PhabricatorSetup { "consequences of leaving it unconfigured.\n"); } - $path = getenv('PATH'); - if (empty($path)) { - self::writeFailure(); - self::write( - "Setup failure! The environmental \$PATH variable is empty. ". - "Phabricator needs to execute system commands like 'svn', 'git', ". - "'hg', and 'diff'. Set up your webserver so that it passes a valid ". - "\$PATH to the PHP process.\n\n"); - if (php_sapi_name() == 'fpm-fcgi') { - self::write( - "You're running php-fpm, so the easiest way to do this is to add ". - "this line to your php-fpm.conf:\n\n". - " env[PATH] = /usr/local/bin:/usr/bin:/bin\n\n". - "Then restart php-fpm.\n"); - } - return; - } else { - self::write(" okay \$PATH is nonempty.\n"); - } - self::write("[OKAY] Core configuration OKAY.\n"); self::writeHeader("REQUIRED PHP EXTENSIONS");