diff options
| author | Jeff Carr <[email protected]> | 2024-11-17 16:04:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-17 16:04:08 -0600 |
| commit | b5d30727293f74c27d19e990245569ed2ba02083 (patch) | |
| tree | abf75f2967ac671ffd1eb69fc25c2e433c88c8d6 /main.go | |
| parent | c23cc60000b0b469e9c55a4e489f97003a2f8395 (diff) | |
fix recursive logicv0.5.11
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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) |
