remove log and cleanup on fail

This commit is contained in:
Anant Pathak committed 2018-02-22 20:10:36 +05:30
1 parent fa1afa3e0c
commit 4ffbdde578
1 file changed
+2 -2
+2 -2
View File
@@ -35,12 +35,12 @@ func start(opts *Options) {
repoName := getLocalRepoName(opts.RepoURL)
fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
r,err := git.PlainClone(dir + "/" + repoName, false, &git.CloneOptions{
_, err = git.PlainClone(dir + "/" + repoName, false, &git.CloneOptions{
URL: opts.RepoURL,
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
})
log.Printf("Cloned the repo::",r)
if err != nil {
cleanup(repoName)
log.Printf("failed to clone repo %v", err)
return
}