mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix wrong place to check disable SSH
This commit is contained in:
		
							
								
								
									
										11
									
								
								cmd/serve.go
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								cmd/serve.go
									
									
									
									
									
								
							@@ -42,11 +42,6 @@ func setup(logPath string) {
 | 
			
		||||
	setting.NewContext()
 | 
			
		||||
	log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
 | 
			
		||||
 | 
			
		||||
	if setting.DisableSSH {
 | 
			
		||||
		println("Gogs: SSH has been disabled")
 | 
			
		||||
		os.Exit(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	models.LoadConfigs()
 | 
			
		||||
 | 
			
		||||
	if setting.UseSQLite3 || setting.UseTiDB {
 | 
			
		||||
@@ -138,8 +133,14 @@ func runServ(c *cli.Context) {
 | 
			
		||||
	if c.IsSet("config") {
 | 
			
		||||
		setting.CustomConf = c.String("config")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setup("serv.log")
 | 
			
		||||
 | 
			
		||||
	if setting.DisableSSH {
 | 
			
		||||
		println("Gogs: SSH has been disabled")
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if len(c.Args()) < 1 {
 | 
			
		||||
		fail("Not enough arguments", "Not enough arguments")
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user