some fix
This commit is contained in:
parent
0d98ec7cde
commit
bcf8b6621b
@ -32,7 +32,7 @@ class Files
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function copyKernelFolder($d1, $d2, int $permissions = 0773, bool $recursive = true): void
|
public function copyKernelFolder($d1, $d2, int $permissions = 0775, bool $recursive = true): void
|
||||||
{
|
{
|
||||||
if (is_dir($d1)) {
|
if (is_dir($d1)) {
|
||||||
if (!file_exists($d2)){
|
if (!file_exists($d2)){
|
||||||
|
@ -124,7 +124,6 @@ class ModuleShopClientController extends AdminController
|
|||||||
|
|
||||||
#[NoReturn] public function actionKernelUpdate(): void
|
#[NoReturn] public function actionKernelUpdate(): void
|
||||||
{
|
{
|
||||||
$request = new Request();
|
|
||||||
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
$modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug');
|
||||||
|
|
||||||
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
$modules_info = json_decode($modules_info->getBody()->getContents(), true);
|
||||||
|
@ -74,7 +74,9 @@ class KernelService
|
|||||||
$this->files->copyKernelFolder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel");
|
$this->files->copyKernelFolder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel");
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
|
Debug::prn($file);
|
||||||
if ($file === 'bootstrap') {
|
if ($file === 'bootstrap') {
|
||||||
|
Debug::prn(123);
|
||||||
$this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap');
|
$this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap');
|
||||||
$this->files->copyKernelFolder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap');
|
$this->files->copyKernelFolder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap');
|
||||||
}
|
}
|
||||||
@ -83,6 +85,7 @@ class KernelService
|
|||||||
|
|
||||||
$this->files->recursiveRemoveDir($tmpKernelDirFull);
|
$this->files->recursiveRemoveDir($tmpKernelDirFull);
|
||||||
unlink(ROOT_DIR . $path);
|
unlink(ROOT_DIR . $path);
|
||||||
|
Debug::dd("update kernel success");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user