Skip to content
Permalink
Browse files

Update core cake command for new bootstrapping.

  • Loading branch information...
markstory committed Aug 5, 2012
1 parent 4bbc3c8 commit 89eeb630bca66cd1f418abb32ee1792dc3cea717
Showing with 6 additions and 22 deletions.
  1. +1 −0 App/Console/cake.php
  2. +5 −21 lib/Cake/Console/cake.php
  3. +0 −1 lib/Cake/bootstrap.php
@@ -18,4 +18,5 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
include dirname(__DIR__) . '/Config/bootstrap.php';
return Cake\Console\ShellDispatcher::run($argv);
@@ -17,27 +17,11 @@
* @since CakePHP(tm) v 1.2.0.5012
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
$ds = DIRECTORY_SEPARATOR;
$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
$found = false;
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
$root = dirname(dirname(dirname(__DIR__)));
foreach ($paths as $path) {
if (file_exists($path . $ds . $dispatcher)) {
$found = $path;
break;
}
// Default app directory layout
if (file_exists($root . '/App/Config/bootstrap.php')) {
require $root . '/App/Config/bootstrap.php';
}
if (!$found) {
$root = dirname(dirname(__DIR__));
if (!include $root . $ds . $dispatcher) {
trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
}
} else {
include $found . $ds . $dispatcher;
}
unset($paths, $path, $found, $dispatcher, $root, $ds);
// TODO read ARGV for -app flag, and bootstrap that application.
return Cake\Console\ShellDispatcher::run($argv);
@@ -29,7 +29,6 @@
use Cake\Core\App;
use Cake\Core\Configure;
App::init();
App::build();

0 comments on commit 89eeb63

Please sign in to comment.
You can’t perform that action at this time.