action update module add
This commit is contained in:
@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user