mirror of
https://github.com/grdl/git-get.git
synced 2026-02-07 17:34:18 +00:00
Refactor repoFinder
- Remove io package and move finder to git package - Move tempDir and writeFile into test package. They are only used for testing purposes anyway. - Add a way to specify parent folder for tempDir. Useful for testing nested repos. - Add new test repos with .git/config files
This commit is contained in:
@@ -2,7 +2,6 @@ package git
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git-get/pkg/io"
|
||||
"git-get/pkg/run"
|
||||
"net/url"
|
||||
"strconv"
|
||||
@@ -43,8 +42,7 @@ type CloneOpts struct {
|
||||
|
||||
// Open checks if given path can be accessed and returns a Repo instance pointing to it.
|
||||
func Open(path string) (Repo, error) {
|
||||
_, err := io.Exists(path)
|
||||
if err != nil {
|
||||
if _, err := Exists(path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user