botstrap.php to kernel update

This commit is contained in:
2024-10-23 16:36:17 +03:00
parent 76d090febf
commit e12bf58baf
2 changed files with 10 additions and 1 deletions

View File

@ -41,6 +41,14 @@ class KernelController extends ConsoleController
$this->out->r("/bootstrap не найден", 'red');
}
if (file_exists(ROOT_DIR . '/bootstrap.php')) {
$tmpBootstrapPhpDirFull = RESOURCES_DIR . '/tmp/ad/kernel/bootstrap.php';
copy(ROOT_DIR . '/bootstrap.php', $tmpBootstrapPhpDirFull);
$this->out->r("/bootstrap.php скопирован во временную папку", 'green');
} else {
$this->out->r("/bootstrap.php не найден", 'red');
}
if (file_exists(ROOT_DIR . '/.env.example')) {
$tmpEnvDirFull = RESOURCES_DIR . '/tmp/ad/kernel/env.example';
copy(ROOT_DIR . '/.env.example', $tmpEnvDirFull);
@ -88,6 +96,7 @@ class KernelController extends ConsoleController
if (isset($this->argv['bootstrap'])) {
$this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap');
$this->files->copy_folder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap');
copy($tmpKernelDirFull . '/bootstrap.php' , ROOT_DIR . '/bootstrap.php');
}
if (isset($this->argv['env'])) {