Skip to content

Commit

Permalink
Preserve homedir template variable for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Mar 16, 2021
1 parent 49ee6bc commit 784a08c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ func (c *Config) defaultTemplateData() map[string]interface{} {
data := map[string]interface{}{
"arch": runtime.GOARCH,
"homeDir": c.homeDir,
"homedir": c.homeDir, // TODO Remove in version 2.1.
"os": runtime.GOOS,
"sourceDir": c.sourceDirAbsPath,
"version": map[string]interface{}{
Expand Down
5 changes: 3 additions & 2 deletions docs/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ the new functionality and for consistency:
* The gpg recipient is configured with the `gpg.recipient` configuration
variable, `gpgRecipient` is no longer used.
* The structure of data output by `chezmoi dump` has changed.
* The `.chezmoi.homedir` template variable has been renamed to
`.chezmoi.homeDir`.
* The `.chezmoi.homedir` template variable has been replaced with
`.chezmoi.homeDir`. For compatibility, `.chezmoi.homedir` will continue to be
supported until version 2.1.
* The `.chezmoi.fullHostname` template variable has been removed, as it did not
contain the full hostname,

0 comments on commit 784a08c

Please sign in to comment.