Commit cfb42d2e authored by guilhermeblanco's avatar guilhermeblanco

[2.0] Fix for CLI Configuration and PEAR installer

parent f8df6217
......@@ -5,7 +5,25 @@ require_once 'Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
$classLoader->register();
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php';
$configuration = new \Doctrine\Common\Cli\Configuration();
if (file_exists($configFile)) {
if ( ! is_readable($configFile)) {
trigger_error(
'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR
);
}
require $configFile;
foreach ($GLOBALS as $configCandidate) {
if ($configCandidate instanceof \Doctrine\Common\Cli\Configuration) {
$configuration = $configCandidate;
break;
}
}
}
$cli = new \Doctrine\Common\Cli\CliController($configuration);
$cli->run($_SERVER['argv']);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment