sync: Non-empty directory without .git is Fatal
This commit is contained in:
parent
3c0751a78a
commit
9d639a0315
|
@ -66,6 +66,8 @@ func (i GitImporter) Init() error {
|
|||
return fmt.Errorf("%w:\n%s", err, stdout)
|
||||
}
|
||||
log.Println("Local git repository successfully cloned")
|
||||
} else if _, err := os.Stat(path.Join(i.li.Base, ".git")); errors.Is(err, os.ErrNotExist) {
|
||||
log.Fatal(i.li.Base, "is not a valid git repository and it cannot be initialized because it's not empty.")
|
||||
}
|
||||
|
||||
// Check if the .git directory exists, change the origin remote to our
|
||||
|
|
Loading…
Reference in New Issue