Skip to content

Commit

Permalink
Don't check for config files in old locations, fixes #113
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Jan 13, 2019
1 parent 1ba2b0c commit 5529485
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@ func getDefaultConfigFile(x *xdg.XDG, homeDir string) string {
}
}
}
// Search for ~/.chezmoi.* for backwards compatibility.
for _, extension := range viper.SupportedExts {
configFilePath := filepath.Join(homeDir, ".chezmoi."+extension)
if _, err := os.Stat(configFilePath); err == nil {
return configFilePath
}
}
// Fallback to XDG default.
return filepath.Join(x.ConfigHome, "chezmoi", "chezmoi.yaml")
}
Expand Down Expand Up @@ -225,11 +218,6 @@ func getDefaultSourceDir(x *xdg.XDG, homeDir string) string {
return sourceDir
}
}
// Check for ~/.chezmoi for backwards compatibility.
sourceDir := filepath.Join(homeDir, ".chezmoi")
if _, err := os.Stat(sourceDir); err == nil {
return sourceDir
}
// Fallback to XDG default.
return filepath.Join(x.DataHome, "chezmoi")
}
Expand Down

0 comments on commit 5529485

Please sign in to comment.