summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/main.go b/main.go
index a3460dc..04614e6 100644
--- a/main.go
+++ b/main.go
@@ -61,6 +61,9 @@ func main() {
if argv.Recursive || argv.Pull || argv.RedoGoMod {
log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
// there is more to do
+ log.Info("argv.Recursive is", argv.Recursive)
+ log.Info("argv.Pull is", argv.Pull)
+ log.Info("argv.RedoGoMod is", argv.RedoGoMod)
log.Info("onward and upward")
} else {
log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
@@ -84,6 +87,17 @@ func main() {
log.Info("could not download:", err)
os.Exit(-1)
}
+ if argv.Recursive || argv.Pull || argv.RedoGoMod {
+ log.Info("repo already cloned", filepath.Join(wdir, argv.Repo))
+ // there is more to do
+ log.Info("argv.Recursive is", argv.Recursive)
+ log.Info("argv.Pull is", argv.Pull)
+ log.Info("argv.RedoGoMod is", argv.RedoGoMod)
+ log.Info("onward and upward")
+ } else {
+ log.Info("repo cloned worked to", filepath.Join(wdir, argv.Repo))
+ os.Exit(0)
+ }
// update go.sum and go.mod
// todo: only do this if they don't exist?
@@ -98,6 +112,7 @@ func main() {
}
}
+ os.Setenv("REPO_AUTO_CLONE", "false")
// look recursively in your working directory for git repos
totalcount := scanForRepos(wdir)
@@ -134,6 +149,7 @@ func main() {
log.Info("how did this repo still not exist?", argv.Repo)
os.Exit(-1)
}
+ os.Setenv("REPO_AUTO_CLONE", "true")
godep := newr.Status.GetGoDeps()
for gopath, version := range godep {
repo, err := rv.NewRepo(gopath)