Fixes panic when there's no user initialized (#358)

tokarchuk/v1.17
Bwko 8 years ago committed by Thomas Boerger
parent 83ed234472
commit 026ad4aee7
  1. 4
      cmd/serve.go

@ -255,11 +255,11 @@ func runServ(c *cli.Context) error {
"User %s does not have level %v access to repository %s", "User %s does not have level %v access to repository %s",
user.Name, requestedMode, repoPath) user.Name, requestedMode, repoPath)
} }
os.Setenv("GITEA_PUSHER_NAME", user.Name)
} }
} }
os.Setenv("GITEA_PUSHER_NAME", user.Name)
uuid := gouuid.NewV4().String() uuid := gouuid.NewV4().String()
os.Setenv("GITEA_UUID", uuid) os.Setenv("GITEA_UUID", uuid)
// Keep the old env variable name for backward compability // Keep the old env variable name for backward compability

Loading…
Cancel
Save