From 8e654015c2eccd62d538ae6d39e78524913775b2 Mon Sep 17 00:00:00 2001 From: James Ennis Date: Thu, 29 Aug 2019 12:32:21 +0100 Subject: cli.py: Allow pull to handle artifact refs This patch adds support for the handling of artifact refs in bst artifact pull. A test for this has also been added. --- src/buildstream/_frontend/cli.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/buildstream/_frontend/cli.py') diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py index 40d73e36c..80b7479eb 100644 --- a/src/buildstream/_frontend/cli.py +++ b/src/buildstream/_frontend/cli.py @@ -1132,10 +1132,10 @@ def artifact_checkout(app, force, deps, integrate, hardlinks, tar, compression, help='The dependency artifacts to pull (default: none)') @click.option('--remote', '-r', default=None, help="The URL of the remote cache (defaults to the first configured cache)") -@click.argument('elements', nargs=-1, +@click.argument('artifacts', nargs=-1, type=click.Path(readable=False)) @click.pass_obj -def artifact_pull(app, elements, deps, remote): +def artifact_pull(app, artifacts, deps, remote): """Pull a built artifact from the configured remote artifact cache. Specifying no elements will result in pulling the default targets @@ -1159,12 +1159,12 @@ def artifact_pull(app, elements, deps, remote): with app.initialized(session_name="Pull"): ignore_junction_targets = False - if not elements: - elements = app.project.get_default_targets() + if not artifacts: + artifacts = app.project.get_default_targets() # Junction elements cannot be pulled, exclude them from default targets ignore_junction_targets = True - app.stream.pull(elements, selection=deps, remote=remote, + app.stream.pull(artifacts, selection=deps, remote=remote, ignore_junction_targets=ignore_junction_targets) -- cgit v1.2.1