bake fix for root path

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3633 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2006-10-13 03:46:47 +00:00
parent 8a64ba93fc
commit 1a977a2053

View file

@ -76,9 +76,11 @@
$projectPath = $app;
}
if($project) {
$app = $projectPath;
}
$shortPath = str_replace($root, '', $app);
$shortPath = str_replace('../', '', $shortPath);
$shortPath = str_replace('//', '/', $shortPath);
@ -87,8 +89,16 @@
$rootDir = str_replace($appDir, '', $shortPath);
$rootDir = str_replace('//', '', $rootDir);
if(!$rootDir) {
$rootDir = $root;
$projectPath = $root.DS.$appDir;
}
define ('ROOT', $rootDir);
define ('APP_DIR', $appDir);
echo ROOT;
echo APP_DIR;
define ('DEBUG', 1);;
define('CAKE_CORE_INCLUDE_PATH', $root);
@ -2098,7 +2108,7 @@ class Bake {
}
}
while ($this->__checkPath($projectPath) === true || $projectPath == '') {
$projectPath = $this->getInput('Directory path exists please choose another:');
$projectPath = $this->getInput('Directory path exists please choose another:');
while ($projectPath == '') {
$projectPath = $this->getInput('The directory path you supplied was empty. Please try again.');
}