File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11<?php
22
33use \Composer \Semver \Comparator ;
4+ use \Symfony \Component \Filesystem \Filesystem ;
45use \EE \Utils ;
5- use Mustangostang \Spyc ;
66
77/**
88 * Review current EE info, check for updates, or see defined aliases.
@@ -505,7 +505,16 @@ public function self_uninstall( $args, $assoc_args ) {
505505 Utils \default_launch ("docker rm -f $(docker ps -aqf label=org.label-schema.vendor= \"EasyEngine \") " );
506506 $ home = Utils \get_home_dir ();
507507 Utils \default_launch ("rm -rf $ home/.ee/ " );
508- Utils \default_launch ("rm -rf $ home/ee-sites/ " );
508+
509+ $ records = EE ::db ()->select (['site_path ' ]);
510+
511+ if ( $ records !== false ) {
512+ $ sites_paths = array_column ($ records , 'site_path ' );
513+ $ fs = new Filesystem ();
514+ $ fs ->remove ($ sites_paths );
515+ }
516+
517+ Utils \default_launch ("rm -df $ home/ee-sites/ " );
509518 Utils \default_launch ("rm -rf /opt/easyengine/ " );
510519 }
511520
You can’t perform that action at this time.
0 commit comments