Skip to content
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

Prevent panic in doctor command when running default checks (#21791) #21807

Merged
merged 1 commit into from
Nov 14, 2022

Commits on Nov 13, 2022

  1. Prevent panic in doctor command when running default checks (go-gitea…

    …#21791)
    
    Backport go-gitea#21791
    
    There was a bug introduced in go-gitea#21352 due to a change of behaviour caused
    by go-gitea#19280. This causes a panic on running the default doctor checks
    because the panic introduced by go-gitea#19280 assumes that the only way
    opts.StdOut and opts.Stderr can be set in RunOpts is deliberately.
    Unfortunately, when running a git.Command the provided RunOpts can be
    set, therefore if you share a common set of RunOpts these two values can
    be set by the previous commands.
    
    This PR stops using common RunOpts for the commands in that doctor check
    but secondly stops RunCommand variants from changing the provided
    RunOpts.
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    421f293 View commit details
    Browse the repository at this point in the history