mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(cli/dotfiles): add an exception for .gitconfig (#9515)
* fix(cli/dotfiles): Only ignore .git directory Resolves #8306 * fix fmt * add exception for .gitconfig * Update dotfiles.go
This commit is contained in:
+2
-2
@@ -176,8 +176,8 @@ func (r *RootCmd) dotfiles() *clibase.Cmd {
|
||||
|
||||
var dotfiles []string
|
||||
for _, f := range files {
|
||||
// make sure we do not copy `.git*` files
|
||||
if strings.HasPrefix(f.Name(), ".") && !strings.HasPrefix(f.Name(), ".git") {
|
||||
// make sure we do not copy `.git*` files except `.gitconfig`
|
||||
if strings.HasPrefix(f.Name(), ".") && (!strings.HasPrefix(f.Name(), ".git") || f.Name() == ".gitconfig") {
|
||||
dotfiles = append(dotfiles, f.Name())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user