mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
remove useless check
This commit is contained in:
parent
810155ef2f
commit
37681627ab
@ -121,10 +121,7 @@ func LoadUserConfigFromFile(v *viper.Viper) error {
|
||||
folder = configDirs.QueryFolderContainsFile("config.yml")
|
||||
}
|
||||
v.AddConfigPath(folder.Path)
|
||||
if err := v.MergeInConfig(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return v.MergeInConfig()
|
||||
}
|
||||
|
||||
// InsertToUserConfig adds a key/value pair to the user's config and saves it
|
||||
@ -139,10 +136,7 @@ func (c *AppConfig) InsertToUserConfig(key, value string) error {
|
||||
return err
|
||||
}
|
||||
v.Set(key, value)
|
||||
if err := v.WriteConfig(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return v.WriteConfig()
|
||||
}
|
||||
|
||||
func getDefaultConfig() []byte {
|
||||
|
@ -18,8 +18,6 @@ func GenerateRepo(filename string) error {
|
||||
if output, err := exec.Command("bash", filename).CombinedOutput(); err != nil {
|
||||
return errors.New(string(output))
|
||||
}
|
||||
if err := os.Chdir(testPath + "repo"); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return os.Chdir(testPath + "repo")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user