action update module add

This commit is contained in:
2024-10-10 11:19:51 +03:00
parent f8e02dc19c
commit e29108f21d
4 changed files with 62 additions and 0 deletions

View File

@ -64,4 +64,18 @@ class ModuleController extends ConsoleController
}
}
/**
* @throws \Exception
*/
public function actionUpdateModule(): void
{
if (!isset($this->argv['path'])) {
throw new \Exception('Missing module path "--path" specified');
}
if (file_exists(ROOT_DIR . $this->argv['path'])) {
$moduleService = new ModuleService();
$moduleService->updateModule($this->argv['path']);
}
}
}