You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/modules/doctor
zeripath d9ba7f7442
Prevent panic in doctor command when running default checks (#21791)
There was a bug introduced in #21352 due to a change of behaviour caused
by #19280. This causes a panic on running the default doctor checks
because the panic introduced by #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 <art27@cantab.net>
2 years ago
..
authorizedkeys.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
breaking.go Merge db.Iterate and IterateObjects (#21641) 2 years ago
checkOldArchives.go Use `ctx` instead of `db.DefaultContext` in some packages(routers/services/modules) (#19163) 2 years ago
dbconsistency.go Move some files into models' sub packages (#20262) 2 years ago
dbversion.go Propagate context and ensure git commands run in request context (#17868) 2 years ago
doctor.go Fix git.Init for doctor sub-command (#20782) 2 years ago
fix16961.go Merge db.Iterate and IterateObjects (#21641) 2 years ago
fix16961_test.go Move repository model into models/repo (#17933) 3 years ago
heads.go Prevent panic in doctor command when running default checks (#21791) 2 years ago
mergebase.go Merge db.Iterate and IterateObjects (#21641) 2 years ago
misc.go Merge db.Iterate and IterateObjects (#21641) 2 years ago
paths.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2 years ago
storage.go Propagate context and ensure git commands run in request context (#17868) 2 years ago
usertype.go Move some files into models' sub packages (#20262) 2 years ago