Only create pprof files for gitea serv if explicitly asked for (#18068)

tokarchuk/v1.17
zeripath 3 years ago committed by GitHub
parent 62dcf1a6fb
commit d097fd6be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/serv.go

@ -191,7 +191,7 @@ func runServ(c *cli.Context) error {
return fail("Invalid repo name", "Invalid repo name: %s", reponame)
}
if setting.EnablePprof || c.Bool("enable-pprof") {
if c.Bool("enable-pprof") {
if err := os.MkdirAll(setting.PprofDataPath, os.ModePerm); err != nil {
return fail("Error while trying to create PPROF_DATA_PATH", "Error while trying to create PPROF_DATA_PATH: %v", err)
}

Loading…
Cancel
Save