Skip to content
Permalink
Browse files

Make -app parameter work again.

  • Loading branch information...
markstory committed Sep 18, 2012
1 parent 5d7f6b3 commit 60bac77946480c0d62fbbfb0abd26a7cd440f46d
Showing with 9 additions and 2 deletions.
  1. +9 −2 lib/Cake/Console/cake.php
@@ -18,10 +18,17 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
$root = dirname(dirname(dirname(__DIR__)));
$loaded = false;
$appIndex = array_search('-app', $argv);
if ($appIndex !== false) {
$loaded = true;
$dir = $argv[$appIndex + 1];
require $dir . '/Config/bootstrap.php';
}
// Default app directory layout
if (file_exists($root . '/App/Config/bootstrap.php')) {
if (!$loaded && file_exists($root . '/App/Config/bootstrap.php')) {
require $root . '/App/Config/bootstrap.php';
}
// TODO read ARGV for -app flag, and bootstrap that application.
unset($root, $loaded, $appIndex, $dir);
return Cake\Console\ShellDispatcher::run($argv);

0 comments on commit 60bac77

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