Skip to content

Commit

Permalink
Merge pull request #871 from twpayne/purge-source-dir
Browse files Browse the repository at this point in the history
Make purge remove source directory even if not default
  • Loading branch information
twpayne committed Aug 22, 2020
2 parents 43cc84b + 78da220 commit 26d2b65
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ func (c *Config) runPurgeCmd(cmd *cobra.Command, args []string) error {
paths = append(paths, filepath.Join(dir, "chezmoi"))
}
}
paths = append(paths, c.configFile, c.getPersistentStateFile())
paths = append(paths,
c.configFile,
c.getPersistentStateFile(),
c.SourceDir,
)

// Remove all paths that exist.
PATH:
Expand Down

0 comments on commit 26d2b65

Please sign in to comment.