Replace "--only-check" CLI option by "--dry-run"

This commit is contained in:
Ivan Kravets
2019-05-16 20:02:45 +03:00
parent b14abeff48
commit aaf61082c1
7 changed files with 35 additions and 10 deletions

View File

@@ -123,13 +123,19 @@ def lib_uninstall(lm, libraries):
"-c",
"--only-check",
is_flag=True,
help="Do not update, only check for new version")
help="DEPRECATED. Please use `--dry-run` instead")
@click.option(
"--dry-run",
is_flag=True,
help="Do not update, only check for the new versions")
@click.option("--json-output", is_flag=True)
@click.pass_obj
def lib_update(lm, libraries, only_check, json_output):
def lib_update(lm, libraries, only_check, dry_run, json_output):
if not libraries:
libraries = [manifest['__pkg_dir'] for manifest in lm.get_installed()]
only_check = dry_run or only_check
if only_check and json_output:
result = []
for library in libraries: