summaryrefslogtreecommitdiff
path: root/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'clone.go')
-rw-r--r--clone.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/clone.go b/clone.go
index d460bca..dc433f2 100644
--- a/clone.go
+++ b/clone.go
@@ -6,7 +6,6 @@ import (
"os"
"path/filepath"
- "go.wit.com/lib/gui/shell"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -20,14 +19,14 @@ func clone(gopath string) (*gitpb.Repo, error) {
}
os.Setenv("REPO_AUTO_CLONE", "true")
// pb, _ := forge.NewGoPath(gopath)
- check := forge.FindByGoPath(gopath)
+ check := forge.FindAnyPath(filepath.Join(forge.GetGoSrc(), gopath))
if check != nil {
if check.IsValidDir() {
// repo already exists and is valid
return check, nil
}
}
- pb, err := forge.Clone(gopath)
+ pb, err := forge.GoClone(gopath)
if err != nil {
log.Info("clone() could not download err:", err)
return nil, err
@@ -37,12 +36,6 @@ func clone(gopath string) (*gitpb.Repo, error) {
return nil, err
}
- // double check it actually downloaded
- fullgitdir := filepath.Join(forge.GetGoSrc(), gopath, ".git")
- if !shell.IsDir(fullgitdir) {
- log.Info("repo cloned failed", filepath.Join(forge.GetGoSrc(), gopath))
- return nil, errors.New(fullgitdir + " was not created")
- }
log.Info("go-clone clone() onward and upward")
return pb, nil
}