mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
init org user scan work
This commit is contained in:
1 parent
c8181dee1b
commit
a77b6e4f8b
3 files changed
+97
-9
No files matched your search
@@ -14,20 +14,21 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// LeakElem contains the line and commit of a leak
|
||||
type LeakElem struct {
|
||||
Line string `json:"line"`
|
||||
Commit string `json:"commit"`
|
||||
}
|
||||
|
||||
func start(_ *Options, repoURL string) {
|
||||
func start(opts *Options) {
|
||||
c := make(chan os.Signal, 2)
|
||||
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
|
||||
|
||||
err := exec.Command("git", "clone", repoURL).Run()
|
||||
err := exec.Command("git", "clone", opts.RepoURL).Run()
|
||||
if err != nil {
|
||||
log.Fatalf("failed to clone repo %v", err)
|
||||
}
|
||||
repoName := getLocalRepoName(repoURL)
|
||||
repoName := getLocalRepoName(opts.RepoURL)
|
||||
if err = os.Chdir(repoName); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user