Skip to content

Commit

Permalink
Add --no-validate option to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
dinvlad committed Sep 2, 2020
1 parent b8b2127 commit 20c24c7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion find_gcp_keys/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ def parse_args():
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
dest='dir_path', help='Directory path to search recursively',
dest='dir_path',
help='Directory path to search recursively',
)
parser.add_argument(
'--no-validate', '-n', action='store_true',
help='Directory path to search recursively',
)
return parser.parse_args()

Expand Down Expand Up @@ -62,6 +67,11 @@ def main():
""" Main entrypoint """
args = parse_args()

if args.no_validate:
for path in find_key_paths(args.dir_path):
print(path)
sys.exit(0)

found = False
for path in find_valid_keys(args.dir_path):
print(path, file=sys.stderr)
Expand Down

0 comments on commit 20c24c7

Please sign in to comment.