Skip to content

Commit

Permalink
Merge branch 'mrrobot47-fix/add-error-msg'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtamuli committed Jun 11, 2018
2 parents 18ff99d + 3b8ec2d commit de002f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Site_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ public function create( $args, $assoc_args ) {
EE::error( 'Invalid arguments' );
}

if ( $this->db::site_in_db( $this->site_name ) ) {
EE::error( "Site $this->site_name already exists. If you want to re-create it please delete the older one using:\n`ee site delete $this->site_name`" );
}

$this->proxy_type = 'ee_traefik';
$this->cache_type = ! empty( $assoc_args['wpredis'] ) ? 'wpredis' : 'none';
$this->le = ! empty( $assoc_args['letsencrypt'] ) ? 'le' : false;
Expand Down

0 comments on commit de002f7

Please sign in to comment.