Changeset View
Changeset View
Standalone View
Standalone View
swh/scanner/cli.py
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
@click.option( | @click.option( | ||||
"-C", | "-C", | ||||
"--config-file", | "--config-file", | ||||
default=None, | default=None, | ||||
type=click.Path(exists=False, dir_okay=False, path_type=str), | type=click.Path(exists=False, dir_okay=False, path_type=str), | ||||
help="""YAML configuration file""", | help="""YAML configuration file""", | ||||
) | ) | ||||
@click.version_option( | @click.version_option( | ||||
version=version("swh-scanner"), prog_name="swh-scanner", | version=version("swh.scanner"), prog_name="swh.scanner", | ||||
) | ) | ||||
@click.pass_context | @click.pass_context | ||||
def scanner(ctx, config_file: Optional[str]): | def scanner(ctx, config_file: Optional[str]): | ||||
env_config_path = os.environ.get(CONFIG_ENVVAR) | env_config_path = os.environ.get(CONFIG_ENVVAR) | ||||
# read_raw_config do not fail if file does not exist, so check it beforehand | # read_raw_config do not fail if file does not exist, so check it beforehand | ||||
# while enforcing loading priority | # while enforcing loading priority | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |