mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04: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)
|
repoName := getLocalRepoName(opts.RepoURL)
|
||||||
fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", 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,
|
URL: opts.RepoURL,
|
||||||
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
|
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth,
|
||||||
})
|
})
|
||||||
log.Printf("Cloned the repo::",r)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
cleanup(repoName)
|
||||||
log.Printf("failed to clone repo %v", err)
|
log.Printf("failed to clone repo %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user