diff options
author | Bwko <bouwko@gmail.com> | 2016-12-06 21:58:34 +0100 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-12-06 21:58:34 +0100 |
commit | 026ad4aee773ee2f90aa44b17be8b5e9f5e66fbe (patch) | |
tree | 91ffe08691fef1f7e0db80f20c4c49518a69ab48 /cmd | |
parent | 83ed234472c85057100db5cc537049812c3a288c (diff) | |
download | gitea-026ad4aee773ee2f90aa44b17be8b5e9f5e66fbe.tar.gz gitea-026ad4aee773ee2f90aa44b17be8b5e9f5e66fbe.zip |
Fixes panic when there's no user initialized (#358)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/serve.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index 1d72b5c30f..53a5c3bef0 100644 --- a/cmd/serve.go +++ b/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.Name, requestedMode, repoPath) } + + os.Setenv("GITEA_PUSHER_NAME", user.Name) } } - os.Setenv("GITEA_PUSHER_NAME", user.Name) - uuid := gouuid.NewV4().String() os.Setenv("GITEA_UUID", uuid) // Keep the old env variable name for backward compability |