Skip to content

Commit

Permalink
feat: Add --debug option to enable detailed error messages in plugin …
Browse files Browse the repository at this point in the history
…manager
  • Loading branch information
erseco committed Oct 19, 2024
1 parent ac0fa2e commit 314d79d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rootfs/var/www/html/admin/cli/install_plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
--type=<plugintype> The type of the plugin (e.g., mod, block, filter, theme, local). Defaults to mod.
--run Execute install. If this option is not set, the script will run in dry mode.
--force Force install even if plugin exists (useful for development).
--debug Enable debug mode to see detailed error messages.
--showsql Show SQL queries before they are executed.
--showdebugging Show developer level debugging information.
Expand All @@ -37,6 +38,7 @@
'run' => false,
'force' => false,
'showsql' => false,
'debug' => false,
'showdebugging' => false,
], [
'h' => 'help'
Expand All @@ -47,6 +49,11 @@
cli_error(get_string('cliunknowoption', 'core_admin', $unrecognised));
}

if ($options['debug']) {
set_debugging(DEBUG_DEVELOPER, true);
cli_writeln('Debug mode enabled.');
}

if ($options['help']) {
cli_writeln($help);
exit(0);
Expand Down

0 comments on commit 314d79d

Please sign in to comment.