Skip to content

Commit 7431fd5

Browse files
committed
Add checks
1 parent 6f756b1 commit 7431fd5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/Site_Command.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,13 @@ private function delete_site() {
958958
$key_file = EE_CONF_ROOT . "/nginx/certs/$this->site_name.key";
959959
$conf_certs = EE_CONF_ROOT . "/acme-conf/certs/$this->site_name";
960960
$conf_var = EE_CONF_ROOT . "/acme-conf/var/$this->site_name";
961-
\EE\Utils\delete_dir( $conf_certs );
962-
\EE\Utils\delete_dir( $conf_var );
961+
// TODO: Change all these operations to use symfony filesystem
962+
if ( file_exists( $conf_certs ) ) {
963+
\EE\Utils\delete_dir( $conf_certs );
964+
}
965+
if ( file_exists( $conf_var ) ) {
966+
\EE\Utils\delete_dir( $conf_var );
967+
}
963968
if ( file_exists( $crt_file ) ) {
964969
unlink( $crt_file );
965970
}

0 commit comments

Comments
 (0)