Skip to content

Commit 20c24c7

Browse files
committed
Add --no-validate option to CLI
1 parent b8b2127 commit 20c24c7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

find_gcp_keys/__main__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ def parse_args():
2020
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
2121
)
2222
parser.add_argument(
23-
dest='dir_path', help='Directory path to search recursively',
23+
dest='dir_path',
24+
help='Directory path to search recursively',
25+
)
26+
parser.add_argument(
27+
'--no-validate', '-n', action='store_true',
28+
help='Directory path to search recursively',
2429
)
2530
return parser.parse_args()
2631

@@ -62,6 +67,11 @@ def main():
6267
""" Main entrypoint """
6368
args = parse_args()
6469

70+
if args.no_validate:
71+
for path in find_key_paths(args.dir_path):
72+
print(path)
73+
sys.exit(0)
74+
6575
found = False
6676
for path in find_valid_keys(args.dir_path):
6777
print(path, file=sys.stderr)

0 commit comments

Comments
 (0)