summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/clone.go b/clone.go
index 6c0fecc..4806e1d 100644
--- a/clone.go
+++ b/clone.go
@@ -68,7 +68,7 @@ func clone(gopath string) (*gitpb.Repo, error) {
gopath = CleanRepoURL(gopath)
os.Setenv("REPO_AUTO_CLONE", "true")
// pb, _ := forge.NewGoPath(gopath)
- check := forge.FindAnyPath(filepath.Join(forge.GetGoSrc(), gopath))
+ check := forge.FindAnyPath(filepath.Join(forge.Config.ReposDir, gopath))
if check != nil {
if check.IsValidDir() {
// repo already exists and is valid
@@ -103,8 +103,8 @@ func recursiveClone(check *gitpb.Repo) error {
if check == nil {
return errors.New("repo was nil")
}
- log.Info("STARTING RECURSIVE CLONE", check.GetGoPath())
- log.Info("STARTING RECURSIVE CLONE", check.GetGoPath())
+ log.Info("STARTING RECURSIVE CLONE", check.Namespace)
+ log.Info("STARTING RECURSIVE CLONE", check.Namespace)
// if just cloned, parse the go.sum file for deps
if check.ParseGoSum() {
} else {
@@ -114,17 +114,17 @@ func recursiveClone(check *gitpb.Repo) error {
check.Reload()
if check.GoDeps == nil {
- log.Info("repo godeps == nil", check.GetGoPath())
+ log.Info("repo godeps == nil", check.Namespace)
return errors.New("no go deps?")
}
// probably this should never be 0 because GoPrimitive should have been true otherwise
if check.GoDeps.Len() == 0 {
- log.Info("repo len(godeps) == 0", check.GetGoPath())
+ log.Info("repo len(godeps) == 0", check.Namespace)
return errors.New("go.sum never parsed?")
}
- log.Info("deps for", check.GetGoPath(), "len()", check.GoDeps.Len())
+ log.Info("deps for", check.Namespace, "len()", check.GoDeps.Len())
deps := check.GoDeps.SortByGoPath()
for deps.Scan() {
depRepo := deps.Next()
@@ -179,7 +179,7 @@ func makeValidGoSum(check *gitpb.Repo) error {
// if this fails, just use go mod
if err := check.ValidGoSum(); err != nil {
- cmd := []string{"go", "mod", "init", check.GetGoPath()}
+ cmd := []string{"go", "mod", "init", check.Namespace}
log.Info("try running", cmd)
if _, err := check.RunQuiet(cmd); err != nil {
log.Info("go mod init failed", err)