From d85c8d8abdf35e786da39c6bcfe5763cb6a9b4f6 Mon Sep 17 00:00:00 2001 From: zricethezav Date: Thu, 1 Mar 2018 19:14:20 -0600 Subject: [PATCH] support for running gitleaks w no args --- main.go | 1 + options.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7ca5e0c0..e171f7cd 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,7 @@ var ( assignRegex *regexp.Regexp fileDiffRegex *regexp.Regexp opts *Options + pwd string ) func init() { diff --git a/options.go b/options.go index 8975872e..f943f00f 100644 --- a/options.go +++ b/options.go @@ -171,7 +171,8 @@ func defaultOptions() (*Options, error) { func (opts *Options) parseOptions(args []string) error { if len(args) == 0 { - help() + opts.LocalMode = true + opts.RepoPath, _ = os.Getwd() } for i := 0; i < len(args); i++ {