updating paths for shell

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5061 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-05-12 22:53:32 +00:00
parent 026d680ccb
commit 5b42ca4355

View file

@ -383,9 +383,9 @@ class ShellDispatcher {
$this->args[] = $params[$i]; $this->args[] = $params[$i];
} }
} }
if(!empty($this->params['working'])) { if(!empty($this->params['working'])) {
$app = basename($this->params['working']); $app = basename($this->params['working']);
$this->params['working'] = dirname($this->params['working']) . DS . basename($this->params['working']);
} else { } else {
$app = 'app'; $app = 'app';
} }
@ -398,7 +398,7 @@ class ShellDispatcher {
} }
if(in_array($app, array('cake', 'console', 'app'))){ if(in_array($app, array('cake', 'console', 'app'))){
$app = 'app'; $app = 'app';
$this->params['working'] = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . $app; $this->params['working'] = dirname(dirname(__FILE__));
} }
$this->params = array_merge(array('app'=> $app, 'root'=> dirname($this->params['working'])), $this->params); $this->params = array_merge(array('app'=> $app, 'root'=> dirname($this->params['working'])), $this->params);
} }
@ -423,8 +423,8 @@ class ShellDispatcher {
function help() { function help() {
$this->stdout("\nPaths:"); $this->stdout("\nPaths:");
$this->stdout(" -working: " . $this->params['working']); $this->stdout(" -working: " . $this->params['working']);
$this->stdout(" -app: ". APP_DIR);
$this->stdout(" -root: " . ROOT); $this->stdout(" -root: " . ROOT);
$this->stdout(" -app: ". APP);
$this->stdout(" -core: " . CORE_PATH); $this->stdout(" -core: " . CORE_PATH);
$this->stdout("\nAvailable Scripts:"); $this->stdout("\nAvailable Scripts:");