mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
remove log and cleanup on fail
This commit is contained in:
1 parent
fa1afa3e0c
commit
4ffbdde578
1 file changed
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user