-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Adjust doctor command format and options #21790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The gitea doctor command is a little weird especially since the recreate-table subcommand. This PR changes the doctor command to be an empty subcommand and adds `gitea doctor check` subcommand. In this subcommand the requested checks are provided as an argument rather than as options. The logging is also changed so that the doctor.log is not provided by default - instead that will only be created if you set `--log-file` option. `--verbose` is provided to output this logging to stdout. `gitea convert` is also moved to be a subcommand as `gitea doctor convert`. Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Need to update version in references. |
@zeripath I briefly looked through the PR, and it looks good to me. Could you please change the version numbers and resolve merge conflicts, so we can finally have this merged? |
I guess @zeripath is currently inactive, but you could raise another PR in place of this one. |
There are some problems for this PR:
So I proposed a new one: Improve "gitea doctor" sub-command and fix "help" commands #26072 |
Replace #21790 And close #25965 by the way (it needs a separate fix for 1.20) Major changes: 1. Move "gitea convert" to "gitea doctor conver". The old "gitea doctor" still works as a hidden sub-command (to avoid breaking) 2. Do not write "doctor.log" by default, it's not useful in most cases and causes bugs like 25965 3. Improve documents 4. Fix the "help" commands. Before, the "./gitea doctor" can't show the sub-command help correctly (regression of the last cli/v2 refactoring) After this PR: ``` ./gitea help # show all sub-commands for the app ./gitea doctor # show the sub-commands for the "doctor" ./gitea doctor help # show the sub-commands for the "doctor", as above ```
The gitea doctor command is a little weird especially since the recreate-table subcommand.
This PR changes the doctor command to be an empty subcommand and adds
gitea doctor check
subcommand.In this subcommand the requested checks are provided as an argument rather than as options. The logging is also changed so that the doctor.log is not provided by default - instead that will only be created if you set
--log-file
option.--verbose
is provided to output this logging to stdout.gitea convert
is also moved to be a subcommand asgitea doctor convert
.Signed-off-by: Andrew Thornton [email protected]