diff --git a/_cleanup.php b/_cleanup.php index d7649bdc6..bc6e3cebe 100644 --- a/_cleanup.php +++ b/_cleanup.php @@ -16,11 +16,13 @@ if (php_sapi_name() !== 'cli') { exit; } -// Get all constants -require_once BB_PATH . '/library/defines.php'; +if (!function_exists('removeFile')) { + // Get all constants + require_once BB_PATH . '/library/defines.php'; -// Include CLI functions -require INC_DIR . '/functions_cli.php'; + // Include CLI functions + require INC_DIR . '/functions_cli.php'; +} $items = [ '.github', diff --git a/install.php b/install.php index efd2a5969..c91e3f938 100644 --- a/install.php +++ b/install.php @@ -94,7 +94,7 @@ if (is_file(BB_ROOT . '.env')) { } // composer dir if (is_dir(BB_ROOT . 'vendor')) { - removeDir(BB_ROOT . 'vendor'); + removeDir(BB_ROOT . 'vendor', true); if (!is_dir(BB_ROOT . 'vendor')) { out("- Composer directory successfully removed!"); } else {