mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fixes panic when there's no user initialized (#358)
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user