Skip to content

Commit 026ad4a

Browse files
Bwkotboerger
authored andcommitted
Fixes panic when there's no user initialized (#358)
1 parent 83ed234 commit 026ad4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: cmd/serve.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ func runServ(c *cli.Context) error {
255255
"User %s does not have level %v access to repository %s",
256256
user.Name, requestedMode, repoPath)
257257
}
258+
259+
os.Setenv("GITEA_PUSHER_NAME", user.Name)
258260
}
259261
}
260262

261-
os.Setenv("GITEA_PUSHER_NAME", user.Name)
262-
263263
uuid := gouuid.NewV4().String()
264264
os.Setenv("GITEA_UUID", uuid)
265265
// Keep the old env variable name for backward compability

0 commit comments

Comments
 (0)