provide a default skel dir, and default to the core

This commit is contained in:
AD7six 2011-04-16 20:15:15 +02:00
parent a0fce70c13
commit c1a8dbbce7

View file

@ -139,12 +139,20 @@ class ProjectTask extends Shell {
$skel = $this->params['skel']; $skel = $this->params['skel'];
} }
while (!$skel) { while (!$skel) {
$skel = $this->in(__d('cake_console', "What is the path to the directory layout you wish to copy?\nExample: %s", APP, null, ROOT . DS . 'myapp' . DS)); $skel = $this->in(
if ($skel == '') { __d('cake_console', "What is the path to the directory layout you wish to copy?"),
null,
CAKE . 'Console' . DS . 'templates' . DS . 'skel'
);
if (!$skel) {
$this->err(__d('cake_console', 'The directory path you supplied was empty. Please try again.')); $this->err(__d('cake_console', 'The directory path you supplied was empty. Please try again.'));
} else { } else {
while (is_dir($skel) === false) { while (is_dir($skel) === false) {
$skel = $this->in(__d('cake_console', 'Directory path does not exist please choose another:')); $skel = $this->in(
__d('cake_console', 'Directory path does not exist please choose another:'),
null,
CAKE . 'Console' . DS . 'templates' . DS . 'skel'
);
} }
} }
} }