You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/08/15 08:00:19 UTC

[buildstream] 02/03: _frontend/cli.py: Rename bst shell element argument to 'target'

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/shell-artifacts
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit a1e59f105f22b7ff4ce83e981e3265a2f979f043
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Mon Aug 15 16:51:31 2022 +0900

    _frontend/cli.py: Rename bst shell element argument to 'target'
    
    This will enable bash completions on artifact names for `bst shell`
---
 src/buildstream/_frontend/cli.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index 39469a42c..fa4e0b6d2 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -668,12 +668,12 @@ def show(app, elements, deps, except_, order, format_):
 @click.option(
     "--ignore-project-source-remotes", is_flag=True, help="Ignore remote source cache servers recommended by projects"
 )
-@click.argument("element", required=False, type=click.Path(readable=False))
+@click.argument("target", required=False, type=click.Path(readable=False))
 @click.argument("command", type=click.STRING, nargs=-1)
 @click.pass_obj
 def shell(
     app,
-    element,
+    target,
     command,
     mount,
     isolate,
@@ -713,16 +713,16 @@ def shell(
     scope = _Scope.BUILD if build_ else _Scope.RUN
 
     with app.initialized():
-        if not element:
-            element = app.project.get_default_target()
-            if not element:
-                raise AppError('Missing argument "ELEMENT".')
+        if not target:
+            target = app.project.get_default_target()
+            if not target:
+                raise AppError('Missing argument "TARGET".')
 
         mounts = [_HostMount(path, host_path) for host_path, path in mount]
 
         try:
             exitcode = app.stream.shell(
-                element,
+                target,
                 scope,
                 app.shell_prompt,
                 mounts=mounts,