Skip to content

Commit

Permalink
provide a default skel dir, and default to the core
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Apr 16, 2011
1 parent a0fce70 commit c1a8dbb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/Cake/Console/Command/Task/ProjectTask.php
Expand Up @@ -139,12 +139,20 @@ function bake($path, $skel = null, $skip = array('empty')) {
$skel = $this->params['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));
if ($skel == '') {
$skel = $this->in(
__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.'));
} else {
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'
);
}
}
}
Expand Down

0 comments on commit c1a8dbb

Please sign in to comment.