Skip to content

Commit

Permalink
Fix for use-defaults flag to generate name if blank
Browse files Browse the repository at this point in the history
  • Loading branch information
kilrizzy committed Jul 25, 2017
1 parent d4c573e commit 02f549b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions app/Commands/Host.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,26 @@ private function updateFromOptions(){
}

private function interrogate(){
if(!$this->useDefaults) {

$projectName = 'project-' . time();


if($this->useDefaults){

if(is_null($this->name)) {
$this->name = $projectName;
}
$this->folderSuffix = $this->config->getFolderSuffix();
$this->folderSuffix = rtrim($this->folderSuffix, "/");
$this->database = $this->defaultDatabaseNameFromKey($this->name);
$this->domain = $this->defaultDomainNameFromKey($this->name);

}else{

if(is_null($this->name)){
$this->name = $this->interrogator->ask(
'What is your project\'s name?',
'project-' . time()
$projectName
);
}

Expand Down

0 comments on commit 02f549b

Please sign in to comment.