Skip to content

Commit

Permalink
Merge pull request #117 from twpayne/break-backwards-compat
Browse files Browse the repository at this point in the history
Don't look for config files in old locations
  • Loading branch information
twpayne authored Jan 13, 2019
2 parents 1ba2b0c + 05935b1 commit ff3f055
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ be optionally included in the body of the commit message.
* The branch applies cleanly to `master`.


## Versioning

`chezmoi` is under active development and will eventually follow [semantic
versioning](https://semver.org/). In the meantime, the PATCH version is
incremented sporadically.


## Release management

Releases are managed with [goreleaser](https://goreleaser.com/).
Expand Down
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 ff3f055

Please sign in to comment.