Fix minor issues with D2630
Summary: - The config is called "resource-path" and the script references "resource-path", but the actual value checked for is "resource-map". - Use nonempty(), since defaulting with getEnvConfig() will give you null if the setting exists but is set to null. This default is nearly useless so maybe we should change it to use coalesce(). - Remove Celerity map initialization from warmup. We don't currently initialize the environment in warmup, and Celerity initialization now depends on the environment. Test Plan: Ran patch locally and on FPM-Warmup. Reviewers: vrana, btrahan Reviewed By: vrana CC: hsb, aran Differential Revision: https://secure.phabricator.com/D2662
This commit is contained in:
@@ -35,12 +35,13 @@ final class CelerityResourceMap {
|
||||
if (empty(self::$instance)) {
|
||||
self::$instance = new CelerityResourceMap();
|
||||
$root = phutil_get_library_root('phabricator');
|
||||
$path = PhabricatorEnv::getEnvConfig(
|
||||
'celerity.resource-map',
|
||||
'__celerity_resource_map__.php');
|
||||
|
||||
$path = PhabricatorEnv::getEnvConfig('celerity.resource-path');
|
||||
$ok = include_once Filesystem::resolvePath($path, $root);
|
||||
if (!$ok) {
|
||||
throw new Exception("Failed to load Celerity resource map!");
|
||||
throw new Exception(
|
||||
"Failed to load Celerity resource map! Check the ".
|
||||
"'celerity.resource-path' setting in your configuration.");
|
||||
}
|
||||
}
|
||||
return self::$instance;
|
||||
|
||||
Reference in New Issue
Block a user