This commit is contained in:
Roman Kelesidis 2025-06-09 14:12:01 +03:00
commit 2359724031
3 changed files with 5 additions and 3 deletions

View file

@ -9,6 +9,7 @@
if (!defined('BB_ROOT')) {
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
define('BB_PATH', BB_ROOT);
}
// Check CLI mode
@ -18,7 +19,7 @@ if (php_sapi_name() !== 'cli') {
if (!function_exists('removeFile')) {
// Get all constants
require_once BB_PATH . '/library/defines.php';
require_once BB_ROOT . 'library/defines.php';
// Include CLI functions
require INC_DIR . '/functions_cli.php';

View file

@ -8,6 +8,7 @@
*/
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
define('BB_PATH', BB_ROOT);
// Check CLI mode
if (php_sapi_name() !== 'cli') {
@ -15,7 +16,7 @@ if (php_sapi_name() !== 'cli') {
}
// Get all constants
require_once BB_PATH . '/library/defines.php';
require_once BB_ROOT . 'library/defines.php';
// Include CLI functions
require INC_DIR . '/functions_cli.php';

View file

@ -44,7 +44,7 @@ function removeDir(string $dir, bool $withoutOutput = false): void
foreach ($files as $file) {
if ($file->isDir()) {
removeDir($file->getPathname());
removeDir($file->getPathname(), $withoutOutput);
} else {
removeFile($file->getPathname(), $withoutOutput);
}