mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 09:15:26 +01:00 
			
		
		
		
	Bugfixes for initCommand (#156)
respect --login parameter again 🚀 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/156 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
		
							
								
								
									
										11
									
								
								cmd/flags.go
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								cmd/flags.go
									
									
									
									
									
								
							| @@ -81,10 +81,21 @@ var AllDefaultFlags = append([]cli.Flag{ | ||||
|  | ||||
| // initCommand returns repository and *Login based on flags | ||||
| func initCommand() (*Login, string, string) { | ||||
| 	err := loadConfig(yamlConfigPath) | ||||
| 	if err != nil { | ||||
| 		log.Fatal("load config file failed ", yamlConfigPath) | ||||
| 	} | ||||
|  | ||||
| 	login, repoPath, err := curGitRepoPath(repoValue) | ||||
| 	if err != nil { | ||||
| 		log.Fatal(err.Error()) | ||||
| 	} | ||||
|  | ||||
| 	if loginValue != "" { | ||||
| 		login = getLoginByName(loginValue) | ||||
| 		if login == nil { | ||||
| 			log.Fatal("Login name " + loginValue + " does not exist") | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	owner, repo := splitRepo(repoPath) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 6543
					6543