mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
messages go back in, will add reporting support s00n
This commit is contained in:
1 parent
7a0ce07f99
commit
801254f97e
1 file changed
+3
-3
@@ -27,13 +27,13 @@ func start(opts *Options) {
|
|||||||
c := make(chan os.Signal, 2)
|
c := make(chan os.Signal, 2)
|
||||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||||
|
|
||||||
// fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
|
fmt.Printf("Cloning \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
|
||||||
err := exec.Command("git", "clone", opts.RepoURL).Run()
|
err := exec.Command("git", "clone", opts.RepoURL).Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("failed to clone repo %v", err)
|
log.Printf("failed to clone repo %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// fmt.Printf("Evaluating \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
|
fmt.Printf("Evaluating \x1b[37;1m%s\x1b[0m...\n", opts.RepoURL)
|
||||||
repoName := getLocalRepoName(opts.RepoURL)
|
repoName := getLocalRepoName(opts.RepoURL)
|
||||||
if err = os.Chdir(repoName); err != nil {
|
if err = os.Chdir(repoName); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@@ -46,7 +46,7 @@ func start(opts *Options) {
|
|||||||
|
|
||||||
report := getLeaks(repoName, opts)
|
report := getLeaks(repoName, opts)
|
||||||
if len(report) == 0 {
|
if len(report) == 0 {
|
||||||
// fmt.Printf("No Leaks detected for \x1b[35;2m%s\x1b[0m...\n\n", opts.RepoURL)
|
fmt.Printf("No Leaks detected for \x1b[35;2m%s\x1b[0m...\n\n", opts.RepoURL)
|
||||||
}
|
}
|
||||||
cleanup(repoName)
|
cleanup(repoName)
|
||||||
reportJSON, _ := json.MarshalIndent(report, "", "\t")
|
reportJSON, _ := json.MarshalIndent(report, "", "\t")
|
||||||
|
|||||||
Reference in new issue
Block a user