mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-06 03:42:54 +02:00
rewrote config file path search (#219)
added comment to clarify coding choices added package xdg to vendor folder rewrote config file path search Co-authored-by: crapStone <crapstone01@gmail.com> Reviewed-on: https://gitea.com/gitea/tea/pulls/219 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
@ -131,7 +131,7 @@ func AddLogin(name, token, user, passwd, sshKey, giteaURL string, insecure bool)
|
||||
|
||||
err := LoadConfig()
|
||||
if err != nil {
|
||||
log.Fatal("Unable to load config file " + yamlConfigPath)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, l := range Config.Logins {
|
||||
@ -253,7 +253,7 @@ func InitCommand(repoValue, loginValue, remoteValue string) (*Login, string, str
|
||||
|
||||
err := LoadConfig()
|
||||
if err != nil {
|
||||
log.Fatal("load config file failed ", yamlConfigPath)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if login, err = GetDefaultLogin(); err != nil {
|
||||
@ -287,7 +287,7 @@ func InitCommand(repoValue, loginValue, remoteValue string) (*Login, string, str
|
||||
func InitCommandLoginOnly(loginValue string) *Login {
|
||||
err := LoadConfig()
|
||||
if err != nil {
|
||||
log.Fatal("load config file failed ", yamlConfigPath)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
var login *Login
|
||||
|
Reference in New Issue
Block a user