Skip to content

Commit d03b42f

Browse files
authored
CM-25728 - Fix relative paths; fix validations of paths (#150)
1 parent 62b4907 commit d03b42f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cycode/cli/code_scanner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353

5454
@click.command(short_help='Scan the git repository including its history.')
55-
@click.argument('path', nargs=1, type=click.STRING, required=True)
55+
@click.argument('path', nargs=1, type=click.Path(exists=True, resolve_path=True), required=True)
5656
@click.option(
5757
'--branch',
5858
'-b',
@@ -98,7 +98,7 @@ def scan_repository(context: click.Context, path: str, branch: str) -> None:
9898

9999

100100
@click.command(short_help='Scan all the commits history in this git repository.')
101-
@click.argument('path', nargs=1, type=click.STRING, required=True)
101+
@click.argument('path', nargs=1, type=click.Path(exists=True, resolve_path=True), required=True)
102102
@click.option(
103103
'--commit_range',
104104
'-r',
@@ -189,7 +189,7 @@ def scan_ci(context: click.Context) -> None:
189189

190190

191191
@click.command(short_help='Scan the files in the path provided in the command.')
192-
@click.argument('path', nargs=1, type=click.STRING, required=True)
192+
@click.argument('path', nargs=1, type=click.Path(exists=True, resolve_path=True), required=True)
193193
@click.pass_context
194194
def scan_path(context: click.Context, path: str) -> None:
195195
progress_bar = context.obj['progress_bar']

0 commit comments

Comments
 (0)