diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -73,6 +73,8 @@ entry_points=''' [console_scripts] swh-identify=swh.model.cli:identify + [swh.cli.subcommands] + identify=swh.model.cli:identify ''', classifiers=[ "Programming Language :: Python :: 3", diff --git a/swh/model/cli.py b/swh/model/cli.py --- a/swh/model/cli.py +++ b/swh/model/cli.py @@ -74,7 +74,7 @@ help='type of object to identify (default: auto)') @click.option('--verify', '-v', metavar='PID', type=PidParamType(), help='reference identifier to be compared with computed one') -@click.argument('objects', nargs=-1, +@click.argument('objects', nargs=-1, required=True, type=click.Path(exists=True, readable=True, allow_dash=True, path_type=bytes)) def identify(obj_type, verify, show_filename, follow_symlinks, objects):