mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
1 parent
d299b5aa7f
commit
2ba97d0fa3
3 files changed
+36
-6
No files matched your search
@@ -119,7 +119,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
const defaultGithubURL = "https://api.github.com/"
|
||||
const version = "1.7.0"
|
||||
const version = "1.7.1"
|
||||
const errExit = 2
|
||||
const leakExit = 1
|
||||
const defaultConfig = `
|
||||
@@ -194,10 +194,6 @@ func main() {
|
||||
fmt.Println(version)
|
||||
os.Exit(0)
|
||||
}
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
os.Exit(errExit)
|
||||
}
|
||||
leaks, err := run()
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
@@ -245,7 +241,13 @@ func run() ([]Leak, error) {
|
||||
func startAudits() ([]Leak, error) {
|
||||
var leaks []Leak
|
||||
// start audits
|
||||
if opts.OwnerPath != "" {
|
||||
if opts.Repo != "" || opts.RepoPath != "" {
|
||||
repo, err := getRepo()
|
||||
if err != nil {
|
||||
return leaks, err
|
||||
}
|
||||
return auditRepo(repo)
|
||||
} else if opts.OwnerPath != "" {
|
||||
repos, err := discoverRepos(opts.OwnerPath)
|
||||
if err != nil {
|
||||
return leaks, err
|
||||
|
||||
Reference in new issue
Block a user