fixing audit repo bug (#101)

* fixing audit repo bug

* bumping version
This commit is contained in:
Zachary Rice authored and GitHub committed 2018-10-02 12:34:05 -05:00
1 parent d299b5aa7f
commit 2ba97d0fa3
3 files changed
+36 -6

No files matched your search

+8 -6
View File
@@ -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