We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 469d6a9 commit 8342b0dCopy full SHA for 8342b0d
1 file changed
internal/dotfiles/dotfiles.go
@@ -26,6 +26,11 @@ func Clone(repoURL string, dryRun bool) error {
26
dotfilesPath := filepath.Join(home, defaultDotfilesDir)
27
28
if _, err := os.Stat(dotfilesPath); err == nil {
29
+ gitDir := filepath.Join(dotfilesPath, ".git")
30
+ if _, err := os.Stat(gitDir); os.IsNotExist(err) {
31
+ fmt.Printf("Dotfiles already exist at %s, skipping clone\n", dotfilesPath)
32
+ return nil
33
+ }
34
if dryRun {
35
fmt.Printf("[DRY-RUN] Would pull latest dotfiles at %s\n", dotfilesPath)
36
return nil
0 commit comments