-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Implement basic app.ini and path checks to doctor cmd #10064
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
O I had a issue once a time: |
@guillep2k is there a chance to add |
Maybe next time. I'd need to investigate all the possible valid syntaxes for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion, otherwise LGTM
Co-Authored-By: John Olheiser <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #10064 +/- ##
=========================================
Coverage ? 42.3%
=========================================
Files ? 618
Lines ? 80850
Branches ? 0
=========================================
Hits ? 34200
Misses ? 42440
Partials ? 4210
Continue to review full report at Codecov.
|
Related: #8781 (comment) |
…#10991) * Mulitple Gitea Doctor improvements (#10943) Backport #10943 * Add `gitea doctor --list` flag to list the checks that will be run, including those by default * Add `gitea doctor --run` to run specific checks * Add `gitea doctor --all` to run all checks * Add db version checker * Add non-default recalculate merge bases check/fixer to doctor * Add hook checker (Fix #9878) and ensure hooks are executable (Fix #6319) * Fix authorized_keys checker - slight change of functionality here because parsing the command is fragile and we should just check if the authorized_keys file is essentially the same as what gitea would produce. (This is still not perfect as order matters - we should probably just md5sum the two files.) * Add SCRIPT_TYPE check (Fix #10977) * Add `gitea doctor --fix` to attempt to fix what is possible to easily fix * Add `gitea doctor --log-file` to set the log-file, be it a file, stdout or to switch off completely. (Fixes previously undetected bug with certain xorm logging configurations - see @6543 comment.) Signed-off-by: Andrew Thornton <[email protected]> * Switch to io.Writer instead of io.StringWriter Signed-off-by: Andrew Thornton <[email protected]>
This PR adds some basic
app.ini
and path checking to thedoctor
command.In particular, it won't proceed if
app.ini
doesn't look healthy enough, and will provide information about the application paths the user may find useful.Normal run
Run with an empty
app.ini
Run with no
app.ini
at allNote: I've "silenced" the default logger since its output (being asynchronous) was mixing in between the doctor's output and I find it confusing:
I think it will be best to create a separate log for all of doctor's activities, but I leave that for another PR.