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