Merge pull request #21 from jeremyd2019/patch-1

add --pretend option to fetch-assets
This commit is contained in:
Christoph Reiter 2021-01-03 21:57:38 +01:00 committed by GitHub
commit b9b725c2ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -715,6 +715,7 @@ def fetch_assets(args: Any) -> None:
def fetch_item(item):
asset, asset_path = item
if not args.pretend:
download_asset(asset, asset_path)
return item
@ -891,6 +892,8 @@ def main(argv: List[str]):
sub.add_argument("targetdir")
sub.add_argument(
"--verbose", action="store_true", help="Show why things are blocked")
sub.add_argument(
"--pretend", action="store_true", help="Don't actually download, just show what would be done")
sub.add_argument(
"--fetch-all", action="store_true", help="Fetch all packages, even blocked ones")
sub.set_defaults(func=fetch_assets)