Skip to content

Conversation

@wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 29, 2021

Partially resolves:

Before: if Fatal error occurs, users see nothing, Gitea exits.
Now: If Fatal error occurs, users can know what happened.

There are still many flaws in Gitea setting system, some fatal errors during CLI sub-commands can be:

  • ...s/setting/setting.go:954:loadFromConf() [F] Expect user 'xiaoguang' but current user is: sysop
  • ...s/setting/setting.go:962:loadFromConf() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission
  • ...s/setting/setting.go:799:loadFromConf() [F] Failed to create '/nonexistent/.ssh': mkdir /nonexistent: permission denied

That's very unfriendly to users and stops embedded sub-command, the Gitea setting system should be polished more, that's what I mean "partially resolves".

@wxiaoguang wxiaoguang linked an issue Dec 29, 2021 that may be closed by this pull request
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 29, 2021
@lunny lunny added backport/v1.15 skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Dec 29, 2021
@lunny lunny added this to the 1.16.0 milestone Dec 29, 2021
@lunny lunny mentioned this pull request Dec 29, 2021
@wxiaoguang wxiaoguang marked this pull request as draft December 29, 2021 12:34
@wxiaoguang wxiaoguang added the pr/wip This PR is not ready for review label Dec 29, 2021
@wxiaoguang
Copy link
Contributor Author

I need think and test more. Give me some more time on this.

@codecov-commenter

This comment has been minimized.

@6543 6543 modified the milestones: 1.16.0, 1.17.0 Jan 6, 2022
@wxiaoguang wxiaoguang changed the title Show error logs in embedded sub-command (Discontinued) Show error logs in embedded sub-command Jan 25, 2022
@wxiaoguang
Copy link
Contributor Author

Discontinued, feel free to take it or make a new PR.

@wxiaoguang wxiaoguang closed this Jan 25, 2022
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@wxiaoguang wxiaoguang removed this from the 1.17.0 milestone Jun 12, 2022
@wxiaoguang wxiaoguang deleted the fix-cli-embedded branch July 12, 2022 05:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. pr/wip This PR is not ready for review skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

embedded subcommand not working in Linux

5 participants