Skip to content

Commit ff3f055

Browse files
authored
Merge pull request #117 from twpayne/break-backwards-compat
Don't look for config files in old locations
2 parents 1ba2b0c + 05935b1 commit ff3f055

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ be optionally included in the body of the commit message.
2020
* The branch applies cleanly to `master`.
2121

2222

23-
## Versioning
24-
25-
`chezmoi` is under active development and will eventually follow [semantic
26-
versioning](https://semver.org/). In the meantime, the PATCH version is
27-
incremented sporadically.
28-
29-
3023
## Release management
3124

3225
Releases are managed with [goreleaser](https://goreleaser.com/).

cmd/config.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ func getDefaultConfigFile(x *xdg.XDG, homeDir string) string {
173173
}
174174
}
175175
}
176-
// Search for ~/.chezmoi.* for backwards compatibility.
177-
for _, extension := range viper.SupportedExts {
178-
configFilePath := filepath.Join(homeDir, ".chezmoi."+extension)
179-
if _, err := os.Stat(configFilePath); err == nil {
180-
return configFilePath
181-
}
182-
}
183176
// Fallback to XDG default.
184177
return filepath.Join(x.ConfigHome, "chezmoi", "chezmoi.yaml")
185178
}
@@ -225,11 +218,6 @@ func getDefaultSourceDir(x *xdg.XDG, homeDir string) string {
225218
return sourceDir
226219
}
227220
}
228-
// Check for ~/.chezmoi for backwards compatibility.
229-
sourceDir := filepath.Join(homeDir, ".chezmoi")
230-
if _, err := os.Stat(sourceDir); err == nil {
231-
return sourceDir
232-
}
233221
// Fallback to XDG default.
234222
return filepath.Join(x.DataHome, "chezmoi")
235223
}

0 commit comments

Comments
 (0)